[Techtalk] redirect php 404 errors

Maria McKinley maria at shadlen.org
Fri Oct 26 06:46:35 UTC 2007

Yes, that helped, and was exactly what I wanted, thanks!


Ben Knowles wrote:
> Hi,
> Yes you can do this pretty easily with apache mod_rewrite rules (or
> similar features in lighttpd).
> Here's a very simple example which may demonstrate what you need:
> #in a file called .htaccess or in any other apache container
> (virtualhost, config file):
> RewriteEngine on
> RewriteRule ^alice.html$ bob.html
> Which just does:
> (turn on Mod Rewrite)
> (for all incoming requests that match 'string starts, has exactly
> "alice.html", and ends' send them to bob.html instead)
> Rewrite rules use regular expressions, can mess with any aspect of a web
> request (frequently they filter on referrers or request) and can be
> really complex and arcane. There are some docs at
> apache.org, eg http://httpd.apache.org/docs/2.2/misc/rewriteguide.html
> and lots of stuff in Google including a nice cheat sheet here:
> http://www.ilovejackdaniels.com/cheat-sheets/mod_rewrite-cheat-sheet/.
> Hope that helps, and wasn't too confusing :)
> adric
> Maria McKinley wrote:
>> Thanks, that was very interesting. Apparently quite a few sites were 
>> directing people to my scp instructions. It seems simple to get rid of 
>> pages, but is there a simple way to redirect to the new pages? Either 
>> through google, or on my own site?
>> cheers,
>> maria
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/techtalk

More information about the Techtalk mailing list