index.php?id=135 to 135.html

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
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

index.php?id=135 to 135.html

Post by elecktricity »

I saw this somewere but cant remember were, I know it has to do with a .htaccess or something, does anybody know were I can read up on something like this?
programmermatt
Forum Commoner
Posts: 65
Joined: Tue Mar 15, 2005 5:03 pm
Contact:

Post by programmermatt »

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

It's a module for apache called mod_rewrite.

If you search this site for mod_rewrite you should find something ;)

If your server has apache compiled with mod_rewrite support you'd crete a .htaccess file with this code

Code: Select all

RewriteEngine    On

RewriteRule  (\d+)\.html$  /index.php?id=$1
You'll need some basic regex knowledge too ;)
Last edited by Chris Corbyn on Tue Oct 25, 2005 4:36 pm, edited 1 time in total.
User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

Post by elecktricity »

thanks for the fast replies ill go read up on it thanks
Post Reply