All,

I'd an issue on hosting.I've Pages which are designed in php or JSP and it is located on the server .And when a person enter say http://x.com within the browser, the primary.php or primary.asp page is going to be displayed.My question it is possible to method to hide the extensions..

Thanks...........

Option 1 mod_rewrite / ISAPI filter to rewrite

For mod_rewrite on Apache, it is actually adding b .htaccess file towards the root directory of the website using the following content...

The next rule will direct all URIs within this format:

http://yoursite.com/Content/Page/

to

http://yoursite.com/Page.php

IE the final little bit of the URI will get changed right into a PHP file of the identical title.

RewriteEngine on

RewriteRule ^Content/([^/.]+)/?$ $1.php [L,NC,QSA]

Option 2 directory structure

This is when you've got a folder structure to represent your site and every folder comes with an index.php file. For instance,

http://yoursite.com/Contact-Us/index.php

Within this example, going to

http://yoursite.com/Contact-Us/

provides you with the extensionless URI that you're after because the index.php page is proven automatically.

I only mention this because it is an answer for any situation in which you on shared Home windows hosting and can't add an ISAPI filter.

You would like mod_rewrite a treadmill of their IIS counterparts.

Provided you're utilizing an apache server, this can be done with url spinning inshtaccess. See http://roshanbh.com.np/2008/02/hide-php-url-spinning-htaccess.html