Jazajay
Active Member
Wack this in your .htaccess file and you can leave the file extensions off all together as every file is deemed to be php by default unless specified otherwise.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php
So you could access a page then by typing in ~
example.com/dir/page
rather than ~
example.com/page.htm
That way even if you changed your whole site from php to asp all you would have to do is change this 1 line
RewriteRule ^(.*)$ $1.asp
And every file gets parsed as a asp document instead. Now that's future proof, lol.
Jaz
Key:
Red ~ .htaccess
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php
So you could access a page then by typing in ~
example.com/dir/page
rather than ~
example.com/page.htm
That way even if you changed your whole site from php to asp all you would have to do is change this 1 line
RewriteRule ^(.*)$ $1.asp
And every file gets parsed as a asp document instead. Now that's future proof, lol.
Jaz
Key:
Red ~ .htaccess