Page 1 of 1
how to remove the .php
Posted: Tue Aug 26, 2008 11:12 pm
by fird01
so how do i remove the .php in url..
so my url from this
http://www.url.com/page.php?huh=hah
to
http://www.url.com/page?huh=hah
could it be done in iis..?and how do i do it... ?
Re: how to remove the .php
Posted: Wed Aug 27, 2008 12:41 am
by it2051229
try str_replace() function
Re: how to remove the .php
Posted: Wed Aug 27, 2008 4:37 am
by pcoder
Go through this site:
http://roshanbh.com.np/2008/03/url-rewr ... ccess.html
I think it would be helpful for you.
Re: how to remove the .php
Posted: Wed Aug 27, 2008 8:28 am
by marcth
I think this is how the cool kids do it:
Code: Select all
$path = "/home/httpd/html/index.php";
$file = basename($path); // $file is set to "index.php"
$file = basename($path, ".php"); // $file is set to "index"
Re: how to remove the .php
Posted: Wed Aug 27, 2008 10:34 am
by Mordred
++pcoder, the other posters obviously have not understood the OP.
How is that "security" btw?
Re: how to remove the .php
Posted: Thu Aug 28, 2008 12:14 am
by pcoder
Can anybody tell me up to some extent, how to create the url like this forums.devnetwork.net using HTACCESS.
All the control is from parameter.
I would be very thankful for u.
Thanks
Re: how to remove the .php
Posted: Tue Sep 02, 2008 12:25 am
by pcoder
Any way i got my solutions.
Thanks
Re: how to remove the .php
Posted: Wed Sep 03, 2008 5:46 am
by JAB Creations
The correct question is: How do I execute PHP without using a file extension?
Additionally it's poor etiquette to get your answer without posting it on a thread when others have attempted to help you. It bothers me greatly when I come across threads on
any forum and some guy is like I figured it out but I'm not going to tell any of you. I mean geez...

Re: how to remove the .php
Posted: Wed Sep 03, 2008 11:31 pm
by pcoder
Actually my requirement was also related to .htaccess. And I posted my requirement here without creating any new topic.
Sorry JAB Creations, my intension was not bad.
Again i want to say sorry.
In the future, i want help from you guys
Thanks
Re: how to remove the .php
Posted: Fri Sep 05, 2008 12:34 pm
by allspiritseve
pcoder wrote:Actually my requirement was also related to .htaccess. And I posted my requirement here without creating any new topic.
Sorry JAB Creations, my intension was not bad.
Again i want to say sorry.
In the future, i want help from you guys
Thanks
I think he just meant that, instead of this:
pcoder wrote:Any way i got my solutions.
Thanks
He wanted you to post the solution that you found, so that others can learn from this post in the future when they run across the same problems.
Re: how to remove the .php
Posted: Mon Sep 22, 2008 2:39 pm
by allicient
Its your webserver (most likely Apache) that determines this. I can't remember off-hand but its something like "AddType". Anyway, if you get your httpd.conf setup right, you can just rename all your .php files.
Not that I can see *why* you'd ever want to do this.
Re: how to remove the .php
Posted: Tue Sep 23, 2008 3:30 am
by Maugrim_The_Reaper
Did the OP simply want to know about creating pretty URLs using mod_rewrite in Apache so a non-php extensions URL maps to a real .php file on the server (but the end user won't see this)?