Go Back   Website Hosting - VPS Hosting - Domain Registration Ireland :: Blacknight > Technical Support > VPS Hosting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-09, 07:18 PM
Junior Member
 
Join Date: May 2009
Location: .de
Posts: 10
Default mod_rewrite / CentOS 5

I have CentOS 5 VPS and I want to enable mod_rewrite. I'm sure this is something that alot of people want to do. But I seem to be getting some conflicting responses, and none of them work.

So I have a VPS, 2 IP addresses, 1 is shared, the other 1 is domain specific. Some of the liturature I've read said that I need to do this for every vhost, but I would like to enable this automatically.

apache is showing the module loaded (via phpinfo)
apache2handler : Loaded Modules
Quote:
core prefork http_core mod_so mod_auth_basic mod_auth_digest mod_authn_file mod_authn_alias mod_authn_anon mod_authn_dbm mod_authn_default mod_authz_host mod_authz_user mod_authz_owner mod_authz_groupfile mod_authz_dbm mod_authz_default util_ldap mod_authnz_ldap mod_include mod_log_config mod_logio mod_env mod_ext_filter mod_mime_magic mod_expires mod_deflate mod_headers mod_usertrack mod_setenvif mod_mime mod_dav mod_status mod_autoindex mod_info mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_proxy mod_proxy_balancer mod_proxy_ftp mod_proxy_http mod_proxy_connect mod_cache mod_suexec mod_disk_cache mod_file_cache mod_mem_cache mod_cgi mod_version mod_perl mod_php5 mod_proxy_ajp mod_python mod_ssl
Any tips on what is the right way to enable mod_rewrite for all my domains (the ones on the shared IP and the IP specific one) ?

Any help would be welcomed !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-05-09, 07:28 PM
blacknight's Avatar
Administrator
Site Admin
 
Join Date: Aug 2003
Location: Ireland
Posts: 629
Send a message via ICQ to blacknight
Default

Is this a Plesk vps or not?

If it's a Plesk vps mod_rewrite is already loaded (or should be)
__________________
Please do not send me PMs for support issues - thanks for your understanding.
Blacknight Blog | VPS Hosting| Blacknight Technical Status Blog | Hosting Wiki |Speed Test|Webmaster Chat |Personal Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-05-09, 07:33 PM
Junior Member
 
Join Date: May 2009
Location: .de
Posts: 10
Default

It is a PLESK VPS.

when I add a basic .htaccess file I start to get 500 server errors
PHP Code:
<IfModule mod_rewrite.c>
#Options +FollowSymlinks
RewriteEngine on


# index.php to /
RewriteCond %{THE_REQUEST} ^GET /.*/index.(php|htmlHTTP
RewriteRule 
(.*)index.(php|html)$ /$[R=301,L]

# force www.
rewritecond %{HTTP_HOST} ^en.org [nc]
rewriterule ^(.*)$ http://www.en.org/$1 [r=301,nc]
</IfModule
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-05-09, 09:30 PM
Junior Member
 
Join Date: May 2009
Location: .de
Posts: 10
Default

it seems like there were a few characters somehow being added to the start of the file
Code:

to be exact.

Well that's 3 hours of my life I will never get back !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-05-09, 09:44 PM
blacknight's Avatar
Administrator
Site Admin
 
Join Date: Aug 2003
Location: Ireland
Posts: 629
Send a message via ICQ to blacknight
Default

I'm not sure if this is affecting you, but I've seen oddities when DOS line endings get into files. You can convert the files using "dos2unix" which might help ...
__________________
Please do not send me PMs for support issues - thanks for your understanding.
Blacknight Blog | VPS Hosting| Blacknight Technical Status Blog | Hosting Wiki |Speed Test|Webmaster Chat |Personal Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
centos, modrewrite

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:08 AM.


VPS Hosting Web Hosting Ireland Blacknight Blog Blacknight Status

Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2010, Jelsoft Enterprises Limited.

SEO by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17