0

I have two URLs

/web/20110606105658/
/about-us/AwardDetails.aspx?AWDID=1

i have to set different 404 error page for URL in htaccess

ex.
/web/20110606105658/ should go to www.google.com
/about-us/AwardDetails.aspx?AWDID=1 should go to www.yahoo.com

webnoob
  • 15,747
  • 13
  • 83
  • 165

1 Answers1

0

You need to use mod_rewrite rules for this 404 handling:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^web/20110606105658/?$ http://www.google.com/ [L,NC,R=301]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{QUERY_STRING} ^AWDID=1$ [NC]
RewriteRule ^about-us/AwardDetails\.aspx$ http://www.yahoo.com/ [L,NC,R=301]
anubhava
  • 761,203
  • 64
  • 569
  • 643