Htaccess File

maxmanni/arrosticini/master/.htaccess

QUERY_STRING, REQUEST_FILENAME, REQUEST_URI
RewriteEngine On
RewriteBase /

RewriteRule ^sitemap.xml$ sitemap.php  [L]

# Allow any files or directories that exist to be displayed directly
RewriteCond ${REQUEST_URI} ^.+$
RewriteCond %{REQUEST_FILENAME} .(gif|jpe?g|png|js|css|swf|php|ico|txt|pdf|xml)$ [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^ - [L]

# Rewrite rule for languages and sections
# only if the request is not for a valid directory, file or link
# Note: use [R=301] for seeing the redirection in the browser bar

# eg. rewrite /something/ or en into index.php?page=something&%1
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^([^/.]+)(/?)$ index.php?page=$1&%1 [L]
Exit mobile version