php question

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
b2k
Forum Newbie
Posts: 6
Joined: Sun Feb 10, 2008 12:58 pm

php question

Post by b2k »

Hi,

Ok, was seeing in some website people have page like this..

Title of the page: WebAPP, name whatever
http://www.mypage.com/webapp.php?=1

and i don't know how they change to this

http://www.mypage.com/webapp/namewhatever

How i can do this?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: php question

Post by Christopher »

I think you mean "clean URLs". You can create directories and put index.php scripts within the directories, or you can use mod_rewrite.
(#10850)
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: php question

Post by s.dot »

You're looking for a request router/mapper (which can be done entirely in php) or you can use mod_rewrite rules in a .htaccess file if you're using apache web server (probably the easier of the two routes).
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
b2k
Forum Newbie
Posts: 6
Joined: Sun Feb 10, 2008 12:58 pm

Re: php question

Post by b2k »

scottayy wrote:You're looking for a request router/mapper (which can be done entirely in php) or you can use mod_rewrite rules in a .htaccess file if you're using apache web server (probably the easier of the two routes).
Thanks, now im begin to understand..

Can you give me some examples?
Post Reply