473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

php extensions

In most sites that, I guess, use php I don't see them use the php extension.

For example,

http://www.google.com/search?source=...=Google+Search

is search a php script?

Right now I have things like file.php?something

and I was wondering if that is ok or if I should look into changing it to
file?something?

That is, is there something bad about using the php exention? (or maybe it
can be turned off or something similar?)

Thanks,
Jon
May 2 '07 #1
3 1291
Jon Slaughter:
Right now I have things like file.php?something

and I was wondering if that is ok or if I should look into changing it to
file?something?
You should have looked into that _before_ publishing URLs.
That is, is there something bad about using the php exention?
URL "extensions" in general are worse than useless.
(or maybe it can be turned off or something similar?)
Look into mod_rewrite or MultiViews.

--
Jock

May 2 '07 #2
On Wed, 02 May 2007 02:53:02 -0500, Jon Slaughter wrote:
In most sites that, I guess, use php I don't see them use the php extension.

For example,

http://www.google.com/search?source=...=Google+Search

is search a php script?
IIRC, Google use their own C/C++ based extensions.
Sh
May 2 '07 #3
Jon Slaughter wrote:
In most sites that, I guess, use php I don't see them use the php extension.

For example,
http://www.google.com/search?source=...=Google+Search
is search a php script?
No -- Google primarily use C for their search. Some of the newer and less
data-intensive stuff is written in Python and Java.

Yahoo, on the other hand, use PHP almost exclusively.
Right now I have things like file.php?something
and I was wondering if that is ok or if I should look into changing it to
file?something?
Or better yet:

file/something/
That is, is there something bad about using the php exention? (or maybe
it can be turned off or something similar?)
Firstly, there is the slight security issue. Occasionally, security issues
are discovered in PHP. If your site includes ".php" in URLs, then it's
blindingly obvious that you're using PHP, so you become a potential target
for attack. This generally isn't a huge issue if you keep your copy of PHP
up to date though.

More importantly though is the issue of "cool urls". You should start by
reading Sir Tim Berners-Lee's essay "Cool URLs Don't Change" (you ought to
be able to find it on Google).

In particular, a few points:

1. What if, in 6 months time, you change to using Python? Do
you want to change all your URLs to ".py", breaking incoming
links?

2. Do visitors care that you're using PHP? If not, why should
they have to write ".php" when they're typing up one of your
URLs, or speak it if they're reading it over the phone? Keep
URLs short, and keep unneeded information (such as which
scripting language you used) out of the URL.

The general tools you can use to ensure nice URLs are Apache's mod_rewrite
module, Apache's MultiViews option and PHP's $_SERVER['PATH_INFO']
variable.

The mindset you have to get into is: the URLs on my website don't have to
bear *any* relation to the filenames I use on my server.

--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux
May 2 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: jacob navia | last post by:
Has anyone here any information about how arrays can be formatted with printf? I mean something besides the usual formatting of each element in a loop. I remember that Trio printf had some...
4
by: christopher diggins | last post by:
A feature that I find signficantly missing in C# is the ability to write functions in interfaces that can call other functions of the interface. Given an interface ISomeInteface the only way we can...
4
by: Lee Forst | last post by:
What is all required to run an ASP.NET application on an IIS server? Of course you would need to have the .NET Framework installed, but do you have to have the ASP.NET Extensions installed? What...
3
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work...
10
by: musosdev | last post by:
Hi guys I'm trying to migrate to VS2005... I've managed to do that, but realised I'd opened my web projects as file projects, and I'm getting the error about network BIOS command limit. ...
59
by: Anando | last post by:
Hi, I have a linear singly linked list of 100 elements. I would like to prune it such that only user specified elements (say only the elements 1, 13, 78 and 100 of the original list) survive...
2
by: antonyliu2002 | last post by:
I am testing AJAX. I've downloaded the AJAX Extension and the CTP December package and installed on BOTH my development machine and the production server. Then I created a very very simple web...
2
by: kelvin.koogan | last post by:
Our company has a mix of users with VS2003 & VS2005. I'm am having difficulty working out how components written with these 2 tools can be written together. I want to be able to a) incorporate a...
1
by: Yan | last post by:
Hi, I'm apparently far from being the 1st one to meet this error... My asp.net ajax page requires ScriptManager.axd but gets a 404. following a lot of "This is how I solved it" posts, I : -...
0
by: Adam Salisbury | last post by:
**To members of microsoft.public.dotnet.framework, apologies for the crosspost. I originally posted this message into that group however have since realised this may have been a better...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.