Sandwich Artist
Posts: 24
152 credits Members referred : 0
« on: May 20, 2009, 04:02:26 pm »
Hello all,
I'm currently setting up my server to host a website that generates URLs on the fly. I've inserted this code into my .httpd file. This code rewrites each request and finds the correct folder. The snippet of code is:
<VirtualHost 192.168.0.6:3128>
<Directory "/var/www/"> Options Indexes FollowSymLinks AllowOverride none Order allow,deny Allow from all </Directory>
ServerName site1.local DocumentRoot /var/www/ RewriteEngine on RewriteMap lowercase int:tolower
However, whenever I run index.php I get this error message:
The requested URL /index.php was not found on this server.
I've checked my error log and found that Apache adds a folder onto my URL. Here is an exert from my error log:
[error] [client 192.168.0.6] File does not exist: C:/var/www/var
As you can see it has added the folder 'var' onto the end of my root. Therefore when my server looks for index.php it can't find it. I need to keep the code that instructs apache to re-write each incoming request to find the right folder for it, but how do I stop it adding a new folder onto the end? I'm quite new to the mod_rewrite function so any help would be great.
Jim.
Global Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6690
34708 credits Members referred : 374