Click here to Skip to main content
15,886,829 members
Please Sign up or sign in to vote.
4.20/5 (2 votes)
I want to name my website as www.abc.edu.pk/xyz
But i was told that it can only be named as www.abc.edu.pk/xyz.html
How can i name it the first way?
Posted

MVC applications does so using URL rewriting. Hope that approach is good for you.

[thumbs up]

 
Share this answer
 
Since you tagged this with ASP.NET, I thought I'd mention that default.aspx acts like index.html in that you can just point to the parent directory and the default.aspx page in that directory will automatically be used.
 
Share this answer
 
if you are using apache look up mod rewrite
redirect all requests to a base page and build your pages from there


abc.com/car/toyota/2


you would split the string type = car make = toyota page = 2 and use those values to build your page
*****************************************************
if you are using static html pages you can do it crudely

you could use a folder for each page and put an index.html inside it

eg the file cars.html could be stored as /cars/index.html

when abc.com/cars is requseted it will show /cars/index.html with a clean URL
 
Share this answer
 
Try URLRewriting

 
Share this answer
 
I thought I might also add if you directory index is "index.html" (i.e when you type www.yourdomain.com you end up looking at http://www.yourdomain.com/index.html) then you can also achieve the same thing with sub folders.

eg:
www.yourdomain.com/yourfolder
www.yourdomain.com/yourfolder/index.html
should be the same location.

On IIS I believe the default directory index is default.html instead of index.html

 
Share this answer
 
If you're using asp.net, try to remap the url in web.config file
or
write a url remapper module which can work for complete solution.
 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900