.htaccess tutorial

htaccess Elite


put request_uri in error 404 page

Ask your mod_rewrite and Redirection questions here, and get answers!

put request_uri in error 404 page

Postby Felixior » 11 Oct 2008 10:47

Visitors of my website are getting a lot of error 404 my log tells me.

They are probably just bots but I'm still curious what url's they are trying to find.

So I want htaccess to send these visitors to an error 404 page like this one:

mydomain.com/error404.php?requesturi=heregoestherequesturi

It is probably simple but I'm not an htaccess expert.

I've tried:

RewriteCond %{REQUEST_URI}
ErrorDocument 404 RewriteRule http://www.mydomain.com/error404.php?%1

but that is probably laughable wrong.

Who helps me out?
Felixior
 
Posts: 1
Joined: 07 Oct 2008 02:54

Return to Redirect or Rewrite Questions