Jump to content

No File Extension


Mikeyham

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...