84 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Sold between 100 and 1 000 dollars
  • United States
Oreius says

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

951 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Netherlands
  • Referred between 1 and 9 users
  • Sold between 1 000 and 5 000 dollars
Daan says

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.

1173 posts
  • Australia
  • Beta Tester
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Sold between 10 000 and 50 000 dollars
Motionreactor says

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

1175 posts
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 200 and 499 users
  • Has been a member for 5-6 years
mabuc says

you can use this in .htaccess

RewriteRule ^about/(.*) about.htm or RewriteRule ^about/(.*) about.php
84 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Sold between 100 and 1 000 dollars
  • United States
Oreius says

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)

2541 posts
  • United States
  • 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 5-6 years
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
+4 more
CreatingDrew says
(btw the theme forest community rocks)
+1 Nice job helping out guys :)
155 posts
  • Bought between 10 and 49 items
  • Canada
  • Exclusive Author
  • Has been a member for 4-5 years
Warll says

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.

84 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Sold between 100 and 1 000 dollars
  • United States
Oreius says

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!

84 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Microlancer Beta Tester
  • Sold between 100 and 1 000 dollars
  • United States
Oreius says
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

155 posts
  • Bought between 10 and 49 items
  • Canada
  • Exclusive Author
  • Has been a member for 4-5 years
Warll says

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.

by
by
by
by
by
by