How to do url rewriting?

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
h@mm3r
Forum Newbie
Posts: 10
Joined: Mon Nov 24, 2003 9:35 am

How to do url rewriting?

Post by h@mm3r »

Is there a simple way (without modifing any server or php config files, but maybe using .htaccess?) make urls like http://www.myserv.com/?page=car&id=10 to http://www.myserv.com/page/car/id/10 ?

I'm running Apache server on Windows with PHP4.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

It has nothing to do with PHP actually, but rather modrewrite in an .htaccess file. Do a Google search: [google]mod rewrite[/google]
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
h@mm3r
Forum Newbie
Posts: 10
Joined: Mon Nov 24, 2003 9:35 am

Post by h@mm3r »

Thanks! :P That helped a lot ;)
Although, I've heard that it can be done in PHP without the mod_rewrite...
Post Reply