I use xampp on non-networked machines (desktop and laptop). Only I have access to these machines, so I'm not too worried about security, unless I'm hacked while browsing the internet. I use xampp to run a local copy of my web site for development purposes.
The problem is the .htaccess directive "ErrorDocument 404 /404.shtml" works on the remote site, but not locally.
I've tweaked httpd.conf, making only this change:
- Code: Select all
<Directory />
AllowOverride All
Require all granted
</Directory>
- Code: Select all
DirectoryIndex index.php
ErrorDocument 404 /404.shtml
The DirectoryIndex works: I get my nicely-formatted php index page when I point my browser to hocalhost/mysite. BTW if I delete. .htaccess, then I get the index.html file
So .htaccess works for line 1, but I still get the default 404 error, not my custom one. On the remote site the custom error page works properly.
I need to edit and test the custom 404 page locally before I upload it, as it's going to do some heavy parsing of the bad URI, then present a "best guess" redirection.
Thanks
Sadhu