![]() |
Hiding .php with .htaccess file
Is it possible to hide the .php extension in the .htacess file? If so what is the best way to do you?
Thank you, JJ |
What do you mean by "hide it" ?
|
<a href="http://stackoverflow.com/a/8371815/6275228" target="_blank">http://stackoverflow.com/a/8371815/6275228</a>
I don't see why you would want to do that though. If you currently have SEO .htaccess rules in place, it may mess up. |
Quote:
Quote:
|
The extension is a function of the browser, not of the software.
|
Quote:
|
It is possible, you just have to find the right .htaccess rules to rewrite any requests not containing .php in the URL to its version with .php in it. On top of that you should check if the file exits using another .htaccess rule.
|
This is what I have been using in the past with non vB-sites:
Code:
## Internally rewrite extensionless file requests to .php files ## Having this used before: it works, but I would advise against using it. I wouldn't go through the potential trouble just for cosmetic reasons. |
The question is why do you want to do it ?
There is the option to use "Mod Rewrite Friendly URLs" in vB4, which (obviously) has to be combined with some htaccess rules (supplied) which will basically do what you want (use urls with no .php extension). |
Quote:
# Forum RewriteRule ^threads/.* showthread.php [QSA] RewriteRule ^forums/.* forumdisplay.php [QSA] RewriteRule ^members/.* member.php [QSA] RewriteRule ^blogs/.* blog.php [QSA] RewriteRule ^entries/.* entry.php [QSA] |
All times are GMT. The time now is 10:27 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|