Mod Rewrite and Vhost help needed

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
ianhull
Forum Contributor
Posts: 310
Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK

Mod Rewrite and Vhost help needed

Post 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
j4IzbInao
Forum Newbie
Posts: 9
Joined: Tue Oct 14, 2008 6:07 am

Re: Mod Rewrite and Vhost help needed

Post 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
Post Reply