![]() |
|
Thread Tools |
#1
|
||||
|
||||
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
__________________
igota.solutions igotacummins.com igotaduramax.com igotajeep.com igotamustang.com igotarzr.com igotaslingshot.com igotasti.com igotasubaru.com No members have liked this post.
|
#2
|
||||
|
||||
What do you mean by "hide it" ?
__________________
Former vBulletin.org Staff Member
Cable Forum Please do not PM me about custom work - I no longer undertake any. Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum. No members have liked this post.
|
#3
|
|||
|
|||
http://stackoverflow.com/a/8371815/6275228
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. No members have liked this post.
|
#4
|
||||
|
||||
it would be just forum instead of forum.php
Originally Posted by Dave
I got that all taken care of, but I can't seem to get nothing to work to hide the extension. I can do it on Xenoforo, but not with vB.
![]()
__________________
igota.solutions igotacummins.com igotaduramax.com igotajeep.com igotamustang.com igotarzr.com igotaslingshot.com igotasti.com igotasubaru.com No members have liked this post.
|
#5
|
||||
|
||||
The extension is a function of the browser, not of the software.
The following members like this post: I.G.O.T.A.
|
#6
|
||||
|
||||
So there is no way to do this?
__________________
igota.solutions igotacummins.com igotaduramax.com igotajeep.com igotamustang.com igotarzr.com igotaslingshot.com igotasti.com igotasubaru.com No members have liked this post.
|
#7
|
|||
|
|||
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.
The following members like this post: I.G.O.T.A.
|
#8
|
||||
|
||||
This is what I have been using in the past with non vB-sites:
Anyway - all of this will not remove the file extensions in vB, i.e. the links in the software will still be .php. 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.
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again. http://www.roma-antiqua.de The following members like this post: I.G.O.T.A.
|
#9
|
||||
|
||||
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).
__________________
Former vBulletin.org Staff Member
Cable Forum Please do not PM me about custom work - I no longer undertake any. Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum. The following members like this post: I.G.O.T.A.
|
#10
|
||||
|
||||
Originally Posted by Paul M
We have that working, but the main forum still shows the .php. We've tried to hide with the code we have below and it works for what you see below, but not for the main forum. ![]()
# 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]
__________________
igota.solutions igotacummins.com igotaduramax.com igotajeep.com igotamustang.com igotarzr.com igotaslingshot.com igotasti.com igotasubaru.com No members have liked this post.
|
![]() |
Tags |
htaccess, php |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 08:00.