Page 1 of 1

Aliasing PHP pages

Posted: Fri Aug 14, 2009 12:30 pm
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.

Re: Aliasing PHP pages

Posted: Fri Aug 14, 2009 12:43 pm
by jackpf
Try googling "mod_rewrite". That should point you in the right direction.

That's apache btw, not php related.

Re: Aliasing PHP pages

Posted: Fri Aug 14, 2009 1:15 pm
by renu31
Thanks a lot jack, I hope my search ends there. :)

Re: Aliasing PHP pages

Posted: Fri Aug 14, 2009 3:08 pm
by jackpf
Just out of curiosity...are there any benefits to using mod_alias over mod_rewrite?

Re: Aliasing PHP pages

Posted: Fri Aug 14, 2009 3:23 pm
by jackpf
Oh right. Then yes, mod_alias would definitely be more appropriate.

Thanks for the info :)