By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,201 Members | 1,617 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,201 IT Pros & Developers. It's quick & easy.

Hiding PHP extension in browser address

P: 18
Hi,all

I wanted to make a system so that in the browser php extension cant be seen. Though I have been able to make it by editing the .htaccess file but I want it such a way that if anyone type the php as extension then it would take him to an error page.
Please help me by giving a .htaccess file where that code is written or give me any useful link. Its very urgent so if you can help quickly then it would help me gain some respect.
Send via Private Mail at this site.
\[email address removed] Thank you all...

Regards
codexxx
May 23 '08 #1
Share this Question
Share on Google+
2 Replies


Markus
Expert 5K+
P: 6,050
Hi,all

I wanted to make a system so that in the browser php extension cant be seen. Though I have been able to make it by editing the .htaccess file but I want it such a way that if anyone type the php as extension then it would take him to an error page.
Please help me by giving a .htaccess file where that code is written or give me any useful link. Its very urgent so if you can help quickly then it would help me gain some respect.
Send via Private Mail at this site.
\[email address removed] Thank you all...

Regards
codexxx
Such requests, which in all honesty sound like demands, are ignored by myself.

Ask in a considerate way and you may get somewhere.

Regards.
May 23 '08 #2

Atli
Expert 5K+
P: 5,058
You can configure your Apache server to execute custom extensions as PHP files, so if you were to configure it to execute, for example, .cgi files as PHP, then you could change the .php files to .cgi.
If they are then called as .php, they would return the standard 404 error.

Would that work?

Send via Private Mail at this site.
This community is based upon sharing information with everybody. Not just the OP.
Because of that, we won't PM or email solutions, but rather post them here in the forums where everybody can benefit from them.

P.S. Posting your email address in the forums is forbidden by the Posting Guidelines, which everybody should have read before posting here.
May 24 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.