Skip to content

Instantly share code, notes, and snippets.

@wodka
Created December 8, 2014 22:47
Show Gist options
  • Save wodka/16992dcd9f738880f227 to your computer and use it in GitHub Desktop.
Save wodka/16992dcd9f738880f227 to your computer and use it in GitHub Desktop.
missing htaccess
RewriteEngine On
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteRule .? %{ENV:BASE}/index.php [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment