Posted By

pntruongphuc on 09/07/10


Tagged

htaccess


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

abdulaziz
kubaitis


Htaccess tips for redirect file not found to new host


 / Published in: Apache
 

URL: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

Make file not found redirect to new host.

  1. # if images files not found will be redirect to our main server
  2. RewriteCond %{REQUEST_URI} .?\.(gif|jpg|png|jpeg)
  3. RewriteCond %{REQUEST_FILENAME} !-f
  4. # Rewrite all other URLs to index.php/URL
  5. RewriteRule .* http://www.extocapital.com/$0 [R=301,L]

Report this snippet  

You need to login to post a comment.