RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php
these are my code lines for my .htaccess file for an project of mine.
i just want to ask if there’re any safety problems or any specific comment of yours
to not use these lines and instead use other lines…
background: i want to use my own little “management system” to get my project online
and this system handle every uri by itself…
if the specific uri not found on the filesystem as a dir or file it should redirect to my
index-file, so the system could instead show home- or any other page.
what do you think?
I think you should use ErrorDocument instead that lines code.
That lines code mean if request for an real directory ( exists on server) or an exitst file, index.php isn’t served.
So if a file or directory is not founded, the page is rewrited by index.php, not redirect, it mean user see content of index page.
if you use ErrorDocument, user know that that file or directory is not found.
background: sorry about my engish