Lc3 Posted November 10, 2008 Share Posted November 10, 2008 Hi, I'm trying to develop on a Windows XP PC and I'm using Apache 2.2, I can't seem to get .htaccess working. It works fine on my Linux production server. In my httpd.conf, I have the line LoadModule rewrite_module modules/mod_rewrite.so uncommented. AccessFileName is set: AccessFileName .htaccess just above: <Directory /> Options Indexes FollowSymLinks AllowOverride All Order deny,allow Allow from all </Directory> <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"> Options Indexes FollowSymLinks AllowOverride All Order deny,allow Allow from all </Directory> Filter for ht files is set <FilesMatch "^\.ht"> Order allow,deny Deny from all Satisfy All </FilesMatch> And I'm trying a very simple .htaccess file placed in my document root: Options +FollowSymlinks RewriteEngine on RewriteRule ^test$ /test.php [NC,L] ErrorDocument 404 /errors/404.php ^ This is similar to the sort of htaccess file I have on my production server which works, but here it seems to completely ignore my htaccess file. 404's go to the default 404 message and the rewrite test to redirect test to test.php doesn't work. Any help? ??? Thanks. P.S. I remembered to restart apache, that's not the problem. (Though I've forgotten that kind of thing before) Quote Link to comment https://forums.phpfreaks.com/topic/132109-cant-rewrite-on-windows/ Share on other sites More sharing options...
Lc3 Posted November 10, 2008 Author Share Posted November 10, 2008 Sorry I just realised my htaccess file is in the wrong directory, i knew it'd be something simple. Quote Link to comment https://forums.phpfreaks.com/topic/132109-cant-rewrite-on-windows/#findComment-686568 Share on other sites More sharing options...
Lc3 Posted November 10, 2008 Author Share Posted November 10, 2008 Sorry I just realised my htaccess file is in the wrong directory, i knew it'd be something simple. But actually, my 404 is working, but my rewrite url isn't working, I must have made a mistake there somewhere can anyone spot it? Quote Link to comment https://forums.phpfreaks.com/topic/132109-cant-rewrite-on-windows/#findComment-686569 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.