Hello,
Here is what I'm trying to do, unfortunately I can't make it working so far.
I have a bunch of .htaccess files for some vhosts which contain some RewriteRules.
Here for example I'll take the simplest one (this is the working example)
.htaccess:
------
RewriteEngine On
RewriteRule ^index.html$ /index.php
------
Now I want to move this in the httpd.conf so to take effect for all vhosts on the server.
I'm using Apache 2.0.52/Red Hat/mod_rewrite is loaded.
According to what I found in the documentation I added the slash (^/) and placed the rule inside a <directory>:
Here is what I have so far:
httpd.conf (not working)
-------------
<Directory "/var/www/vhosts">
Options +FollowSymLinks
AllowOverride None
RewriteEngine On
RewriteRule ^/index.html$ index.php
</Directory>
--------------
Here is my log:
--------------
212.***.***.*** - - [30/Oct/2006:10:52:45 --0600] [sampledomain.com/sid#94d4
3c8][rid#9
6d5948/ini
tial] (3) [per-dir /var/www/vhosts/sampledoma
in.com/htt
pdocs/] strip per-dir prefix: /var/www/vhosts/sampledoma
in.com/htt
pdocs/inde
x.html -> index.html
212.***.***.*** - - [30/Oct/2006:10:52:45 --0600] [sampledomain.com/sid#94d4
3c8][rid#9
6d5948/ini
tial] (3) [per-dir /var/www/vhosts/sampledoma
in.com/htt
pdocs/] applying pattern '^/index.html$' to uri 'index.html'
212.***.***.*** - - [30/Oct/2006:10:52:45 --0600] [sampledomain.com/sid#94d4
3c8][rid#9
6d5948/ini
tial] (1) [per-dir /var/www/vhosts/sampledoma
in.com/htt
pdocs/] pass through /var/www/vhosts/sampledoma
in.com/htt
pdocs/inde
x.html
Do anybody has idea how to make this rule working inside the httpd.conf file and to be valid for all vhosts?
Thank you in advance.
Start Free Trial