Options +FollowSymLinks +ExecCGI
RewriteEngine On # <-- switch the rewrite engine on
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase / # The resource requested in the HTTP request line, eg: "/index.html"
# we skip all files with .something
#RewriteCond %{REQUEST_URI} \..+$ # <-- if uri match 'dot "something"' at the end of string
#RewriteCond %{REQUEST_URI} !\.html$ # <-- and if uri does not match 'dot "html"' at the end of string
#RewriteRule .* - [L] # <-- rule: don't substitute any thing; this is the last rule, don't run any other rule
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA] # append to the URL instead of replacing it
RewriteRule ^([^.]+)$ $1.html [QSA] # append to the URL instead of replacing it
# %{REQUEST_FILENAME} -> The full local filesystem path to the file or script matching the request
RewriteCond %{REQUEST_FILENAME} !-f # <-- if the local file does not exist
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L] # append to the URL instead of replacing it; this is the last rule, don't run any other rule
Advertisement




