Ok I need some help with my urls
on one project I did the urls like
<a>/about</a>so that it would display with out the .html extension and it works great
now i have a new project and for some reason I can not get it to work i can do
/about.htmland that works but I don’t want the .html
and when I try doing it without the .html upload to the server and test in my browser i get a 404
so is there a server setting that i need to check or is there another problem? I can’t figure this one out
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Has been a member for 4-5 years
- Netherlands
- Referred between 1 and 9 users
- Sold between 1 000 and 5 000 dollars
When you are linking towards /about/, you are actually linking to /about/index.html (or php). As far as I know, there’s a small htaccess ajustment that allows you to type /about/ and still end up at the about.html file. You might want to look into that.
It’s called Apache mod_rewrite…
http://net.tutsplus.com/tutorials/other/a-deeper-look-at-mod_rewrite-for-apache/
...and it makes pretty urls.
That is of course, assuming you are running an Apache Unix based server. There is a Windows server equivalent apparently… of a different name of course
you can use this in .htaccess
RewriteRule ^about/(.*) about.htm or RewriteRule ^about/(.*) about.php
Ok wow that makes some sense because on the project that it worked on i was the client second web guy so he must have done that the server is through 1and1 on the other one I am technically the second guy but the other dude must have not changed that.
Ok I will try your suggestions thanks a whole bunch I let you know how it turns out
(btw the theme forest community rocks)
- Community Moderator
- United States
- Was featured in a podcast
- Attended a Community Meetup
- Author had a Free File of the Month
- Bought between 50 and 99 items
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
- Contributed a Tutorial to a Tuts+ Site
(btw the theme forest community rocks)+1 Nice job helping out guys

Some hosts have this set up automagicly. I remember reading somewhere where a host mentioned which and in what order their servers were set up to search for.
Ie something like:
index.html index.htm default.html default.htm INDEX .HTML index.php and the like.
Yes thank you. Its awesome to know that at three in the morning when you are banging your head to figure out a problem you can leave a question on the forums and feel like you can get some sleep!
Some hosts have this set up automagicly. I remember reading somewhere where a host mentioned which and in what order their servers were set up to search for.Ie something like:
index.html index.htm default.html default.htm INDEX .HTML index.php and the like.
Do you know where one might find it I am pretty sure I have look over every thing on the control panel the company is dot5hosting maybe I can convince the client to switch
Its not something to switch hosts over, just something that a larger host will have already set up.
Use mod_rewrite, its powerful enough to do anything.
