Htaccess tips for redirect file not found to new host


/ Published in: Apache
Save to your folder(s)

Make file not found redirect to new host.


Copy this code and paste it in your HTML
  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]

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.