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 .*$0 [R=301,L]


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.