RewriteRule base directory
am 11.07.2007 18:48:36 von SalagirHello,
I'm trying to get a simple rewrite like
RewriteRule ^.*\.html$ display.php?page=$0
But this time, my php is in another folder, far away, even far from the
DocumentRoot of the site. And I can't get to it.
The php is still in the path defined in
thought it could work. Plus the RewriteRule is in the
httpd.conf, not in an htaccess.
I tried many things, but each time the value of %{DocumentRoot} is
prepended. I tryed begining the path with ../../../ and such, it just
made another kind of error.
And I tryed modifing RewriteBase but no change either.
Do you have an idea ?
Example of what I try to do :
----- in httpd.conf -----
Options MultiViews Indexes FollowSymLinks
...
RewriteEngine on
RewriteRule ^.*\.html$ /home/salagir/sites/lib/display.php?page=$0
ServerName myfirstsite.com
DocumentRoot /home/salagir/sites/myfirstsite.com
ServerName mysecondsite.com
DocumentRoot /home/salagir/sites/mysecondsite.com
--- in /var/log/apache/error.log ---
[Wed Jul 11 18:43:22 2007] [error] [client ...] File does not exist:
/home/salagir/sites/myfirstsite.com/home/salagir/lib/display .php
^
When I add some "../" in the rewrite rule, directories are deleted from the
"^", not the beginning.
--
My Webcomic: www.geeksworld.org -+- All my websites: manaworld.free.fr