mod_rewrite and virtual hosts
-
I’ve set up Apache, PHP and MySQL on my own computer, so that I can test sites locally without worrying about messing up a working configuration. Everything went smoothly except for using the mod_rewrite rules.
I’m using a VirtualHost setup, so that I can enterhttp://test.artfall.co.uk/in a browser and have it point to the files in ~/Sites/artfall. In itself, this works fine, but if I try to access any of the pages via the re-written URLs (eg. test.artfall.co.uk/archives/2004/04/24) I get a 404 error. When I look in the Apache error logs, it seems to be looking for ~/Sites/artfall/archives…etc., and obviously it doesn’t find it.
I’ve tried using the standard .htaccess file (exactly the same as the one I have on the live–and working–site) in ~/Sites/artfall, and I’ve also tried putting the Rewrite rules instead in the VirtualHosts directive. Neither works. Has anybody got this working? I have checked that mod_rewrite is installed.
The topic ‘mod_rewrite and virtual hosts’ is closed to new replies.