[eluser]Xeoncross[/eluser]
I was just going over this file when I realized that it can be improved.
Code:
# If the file is NOT the index.php file
RewriteCond %{REQUEST_FILENAME} !index.php
# Hide all PHP files so none can be accessed by HTTP
RewriteRule (.*)\.php$ index.php?/$1
# If the file/dir is not real
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
Shouldn't we be able to check to see if it has a PHP extension instead of just point everything to the index.php file?
Code:
# If the file/dir is not real
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Hide all PHP files so none can be accessed by HTTP
# If they are accessing a PHP file
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
Is this the right way to do it?