How do I get pretty URLs on my website?
Asked by
jrpowell (
40562)
November 7th, 2007
Observing members:
0
Composing members:
0
4 Answers
It’s done (or can be done) with mod_rewrite, which may be configurable from .htaccess files, and the details are rather more complex than a fluther answer really allows. In part, it depends on how you want the URLs rewritten and how your website is set up, and mod_rewrite is extremely powerful but also extremely complex.
Your best bet is to find someone who knows Apache web server configuration, and be prepared to shell out $100 or so for his or her time. This sort of consulting may actually be something your web host provides upon request.
Failing that, google for mod_rewrite and read up on it, and good luck.
Is the php code that is serving those pages custom, or are you using an “off the shelf” CMS, open-source or otherwise? Many CMS offerings have built-in or community-created solutions for friendly URLs…
Just thought I would stop in to let everyone know that I got it working in theory..
I’m able to pull through the needed variables. Still a bunch of things that need to be worked out. I will basically have to re-write my site to get everything working properly. But the code was really ugly and needs to be cleaned up anyway.
Here is what I got working.. http://prettyurltest.nfshost.com/
Thanks..
SInce, you have mod_rewrite working on you site, checkout http://www.workingwith.me.uk/articles/scripting/mod_rewrite, it is an excellent tutorial for learning mod_rewrite. Also checkout this link, it is a cheat sheet with all of the things that you will need to get a complex or simple rewrite rule set up and runnig.
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.