Skip to content

Instantly share code, notes, and snippets.

@chanmix51
Created April 4, 2011 09:09
Show Gist options
  • Save chanmix51/901330 to your computer and use it in GitHub Desktop.
Save chanmix51/901330 to your computer and use it in GitHub Desktop.
Redirect in new if file does not exist in old
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/(old|new)
RewriteRule ^.*$ - [L]
RewriteRule ^(.*) old/$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^old(.*) new/index.php$1 [QSA]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment