Monday, October 27, 2014

.htaccess file not being read on localhost

My live site reads the .htaccess fine. I got 404.php and mod_rewrite working fine there, but on my localhost... nothing.





  • PHPmyAdmin 3.1.5

  • PHP 5.2.9-2

  • Apache 2.2



My .htaccess is this:



ErrorDocument 404 /404.php


Options +FollowSymLinks
RewriteEngine on
RewriteBase /

RewriteRule ^news/([0-9]+)-(.*)\.html$ news/index.php?id=$1 [L]


Reading http://localhost/phpinfo.php reveals that mod_rewrite is turned on, but it doesn't work, neither does the 404.php page. The Apache error logs only reveal that the page was not found on this server.




My httpd.conf currently looks like this:



DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"


Options FollowSymLinks
Order Allow,Deny
Allow from 127.0.0.1
Deny from All




I can change it to any combination you want, but it won't do anything. Where else could the source of my headaches be? What am I missing?



Thanks,
signed, noob (at technical stuff)

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...