Browser Friendly Urls

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
tmaiden
Forum Commoner
Posts: 64
Joined: Fri Feb 24, 2006 3:15 pm
Location: Philadelphia
Contact:

Browser Friendly Urls

Post by tmaiden »

I read something about mod_rewrite or something which would change my urls from....

http://www.mysite.com/?101
to
http://www.mysite.com/101.htm

How is this possible; or where can I find additional information about it?
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

I personally wouldn't add the HTML to end because then the user has to remember website.com/103.html and that is a little annoying in my opionion, but if you do:

Code: Select all

RewriteEngine On 
RewriteBase /xyz 
RewriteRule ^old\.html$ new.html
In the config file it will take everything at /***/page.html or whatever and make it what every you set as the rule.

I personally don't know how to do it, all I found was that at http://publib.boulder.ibm.com/infocente ... ewrite.htm
Under RewriteBase
Post Reply