Forum Moderators: phranque
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [S=1]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ - [S=1]
RewriteRule !\.[a-z]{2,4}$ _structure/page.php [NC]
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|css|js)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.[a-z]{2,4}$ _structure/page.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ - [S=1]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule !\.[a-z]{2,4}$ _structure/page.php [NC,L]
# Skip the next rule if the requested URL-path does not
# resolve to a physically-existing directory or file
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ - [S=1]
# Else if the requested URL-path resolves to a physically-existing directory
# or extensionless file, rewrite it to the /_structure/page.php script
RewriteRule !\.[a-z]{2,4}$ /_structure/page.php [L]
# If the requested URL-path resolves to a physically-existing directory
# or extensionless file, rewrite it to the /_structure/page.php script
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule !\.[a-z]{2,4}$ /_structure/page.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ - [S=1]
RewriteRule !\.[a-z]{2,4}$ _structure/page.php