Aliasing PHP pages

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
renu31
Forum Newbie
Posts: 2
Joined: Fri Aug 14, 2009 12:20 pm

Aliasing PHP pages

Post by renu31 »

Hi all,
I am entirely new to php. But I am familiar to oops and other scripting languages like asp.
I installed Apache, PHP and MySql using wamp server 2. The editor I chose is eclipse with and php plugin.

I have a starting question. I created a php project and just added a page let say myfirstPHPPage.php in my wwwroot folder (the virtual path)
I hit http://localhost:80/myfirstPHPpage.php and everything works fine.

What I want to do is alias the page link. That is lets say, I hit http://localhost:80/home
I want the browser to render myfirstPHPPage.php
some one please guide me.
(googling didn't help. I am not able to proceed any further).

Thanks in advance,
Renuka Prasad.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Aliasing PHP pages

Post by jackpf »

Try googling "mod_rewrite". That should point you in the right direction.

That's apache btw, not php related.
renu31
Forum Newbie
Posts: 2
Joined: Fri Aug 14, 2009 12:20 pm

Re: Aliasing PHP pages

Post by renu31 »

Thanks a lot jack, I hope my search ends there. :)
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Aliasing PHP pages

Post by jackpf »

Just out of curiosity...are there any benefits to using mod_alias over mod_rewrite?
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Aliasing PHP pages

Post by jackpf »

Oh right. Then yes, mod_alias would definitely be more appropriate.

Thanks for the info :)
Post Reply