Jump to content

No File Extension


Mikeyham
 Share

Recommended Posts

How come some URLs I find have no file extension, like .htm, .asp, or .php? For example: http://www.google.com/search?hl=en&rlz...amp;btnG=Searchor http://en.wikipedia.org/wiki/Main_PageIs there anyway I can do this on my website?~Thanks!

Link to comment
Share on other sites

They use mod_rewrite.You put it into a .htaccess file.Something like this:

RewriteRule search(.*) search.php$1

They probably have something more complex, but I just made something really simple as an example. They use Regular Expressions. Not all servers use htaccess either, with some of them I think you have to change the server configuration itself.

Link to comment
Share on other sites

So I see. My web host does support .htaccess, but I don't see a reason for doing something that like that while I'm the only one that visits it =P Thanks alot though!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...