Hey folks, what I've done is used .htaccess in my root folder to specify the following:
This works fine, however I want a particular folder to redirect to a different URL on error 404. I've placed a .htaccess file in that folder and changed the URL for ErrorDocument 404 accordingly, however it still redirects to the old URL. On the other hand, I may not even be setting this up correctly for what I want to do. Basically, I want a folder to act like Wikipedia's do. That is, if a user types in , I would like the script index.pl inside the states folder to use pennsylvania as a variable and not a folder. I assume that you could pass the entire 404 path to a script (../states/index.pl) and just slice off the missing "folder" from the end to use as a variable in your script. Is this correct or does assuming really make an ass of u and me :|
Code:
DirectoryIndex index.pl
ErrorDocument 403 [URL unfurl="true"]http://www.something.com/error.pl?403[/URL]
ErrorDocument 404 [URL unfurl="true"]http://www.something.com/error.pl?404[/URL]
ErrorDocument 500 [URL unfurl="true"]http://www.something.com/error.pl?500[/URL]
Options -Indexes