Forum Moderators: phranque

Message Too Old, No Replies

Confirming mod_rewrite is functional

on a virtualServer

         

willybfriendly

11:23 pm on Jun 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Question one - is there a simple test to determine if mod-Rewrite is functioning? I did try [webmasterworld.com ] in htaccess.

It does not appear to be functioning :( 404 rules the day.

Question two: This is a site on a <virtualServer> hosted on a VPS. Is there a trick to getting it working under such circumstances. i have spent better than 2 hrs surfing for answers and reading Apache documentation - the only results of which are a good headache.

WBF

jdMorgan

3:16 am on Jun 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you used the entire code snippet from that thread, modified it to suit your existing filenames, and it still didn't work, then check with your host; In the virtual host config, you'll need AllowOverride FileInfo Options as a minimum, in order to use mod_rewrite in .htaccess with the Options directive as shown in the previous thread.

If you get any errors while testing, then examine your server error log; The info in there is often quite specific and helpful.

Jim

willybfriendly

5:36 am on Jun 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks JD. I am pretty well convinced it is how I am configuring it. New commands and all. I need to study up a bit more.

FWIW, this is what I have currently:

<VirtualHost *>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/html/example
<Directory "/var/www/html/example">
AllowOverride All
</Directory>
</VirtualHost>

At least this version doesn't crahs the site, but I am still unable to rewrite my URLs :(

WBF

jdMorgan

6:07 am on Jun 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure what version of Apache you're on, but go through any existing (default) AddModule and/or LoadModule lines in httpd.conf or conf.d, and make sure that lines referring to mod_rewrite are not commented-out.

Jim