Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RewriteEngine On
- RewriteBase /pages
- RewriteCond %{REQUEST_FILENAME} -f [OR]
- RewriteCond %{REQUEST_FILENAME} -d
- RewriteRule .* - [L]
- RewriteRule ^([_0-9a-zA-Z-]+/)?((?:am-.*)|(?:.*\.php)) $2 [L]
- # RewriteRule ^([_0-9a-zA-Z-]+/)?()$ $2 [L] # merged into the rule above
- # RewriteCond %{REQUEST_FILENAME} !-f # superfluous, has been asserted by the first two conditions
- RewriteCond %{REQUEST_URI} !(.*)/$
- RewriteRule (.*)$ /pages/$1/ [R=301,L]
- # RewriteRule ^index\.php$ - [L] # superfluous, has been handled by the first rule
- # RewriteCond %{REQUEST_FILENAME} !-f # superfluous, has been asserted by the first two conditions
- # RewriteCond %{REQUEST_FILENAME} !-d # superfluous, has been asserted by the first two conditions
- RewriteRule ^([a-zA-Z0-9\-_\/\s]+)/?$ /pages/index.php [L]
Advertisement
Add Comment
Please, Sign In to add comment