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 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..


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:


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,

Within this example, going to

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