Page 1 of 1

Mod Rewrite and Vhost help needed

Posted: Thu Nov 06, 2008 2:51 pm
by ianhull
Hi all,

I am having a litle problem with using mod rewrite and virtual hosts here is my vhosts file

<VirtualHost *:80>
ServerAdmin webmaster@health-safety-advisory.co.uk
DocumentRoot "C:/wamp/v-hosts/health-safety-advisory.co.uk/htdocs"
ServerName health-safety-advisory.co.uk
ServerAlias http://www.health-safety-advisory.co.uk
ErrorLog "C:/wamp/v-hosts/health-safety-advisory.co.uk/logs/error.log"
CustomLog "C:/wamp/v-hosts/health-safety-advisory.co.uk/logs/access.log" common

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>

</VirtualHost>

Mod Rewrite is working in the root directory but not as a vhost

here is my mod rewrite in .htaccess

Code: Select all

 
 
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+).html$ index.php?pageName=$1
RewriteRule ^([a-zA-Z0-9_-]+)/.html$ index.php?pageName=$1
 
 
Any ideas or suggestions are very grateful

Re: Mod Rewrite and Vhost help needed

Posted: Fri Nov 07, 2008 12:29 am
by j4IzbInao
Set allowoverride to allow htaccess overrides as for now you do not allow it. It should solve the problem.

Code: Select all

AllowOverride All