a php file, but no extension

Associate
Joined
16 Jun 2003
Posts
1,858
is this alright or not?

rather than having say, "login.php" as a file, it has just "login" with no extension. it is a php file ... it seems to display OK. (I have not done this but have seen other people do it). why?
 
It's trendy to do URLs with no extension by a little bit of .htaccess trickery (or, even, creating the folders and having the scripts as index.php files within the folder) :)
 
Beansprout said:
It's trendy
Well more important than being trendy, it's good forward thinking. Stops you locking your site into a particular technology. Potential huge timesaver for the tiny effort required to implement.

/login is good for login.aspx, login.php, login.htm...
 
It also help (albeit not much) against malicious attacks.. without an extension, it adds the little extra step for someone to work out which technology you are using.
 
Dj_Jestar said:
It also help (albeit not much) against malicious attacks.. without an extension, it adds the little extra step for someone to work out which technology you are using.

X-Powered-By: PHP/5.1.4
 
Augmented said:
Well more important than being trendy, it's good forward thinking. Stops you locking your site into a particular technology. Potential huge timesaver for the tiny effort required to implement.

/login is good for login.aspx, login.php, login.htm...
You got me there by reminding me of Cool URIs :)

I do agree of course, just said trendy because I was lazy...honest... :eek:
 
looking at it a different way, assuming the filesystem in a unix-based one there is no need for a extension.
 
As said in the cool urls article linked above, don't think of the URI space as having to mirror the filesystem. Treat them as seperate entities and you can be as creative as you like.

mod_rewrite is such an amazing tool. :)
 
kiwi said:
looking at it a different way, assuming the filesystem in a unix-based one there is no need for a extension.
What OS is on the server makes little to no difference at all when it comes to handling HTTP requests via a Webserver app like Apache. :)
 
Back
Top Bottom