Forum Moderators: phranque
Options +FollowSymLinks
RewriteEngine On
#RewriteBase /orientation_dev
RewriteBase /
#if the file exist pass it on thru and exit.
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.+) $1 [L]
#if the file NOT a directory redirect to index
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ index.php?q=$1 [L]
RewriteRule ^(.+)$ $1/ [L,R=301]
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L,NE]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?q=$1 [QSA,NE]