RE: [PHP] URL modification
| From: | Andrés Robinet | Date: | Fri, 22 Feb 2008 07:48:07 +0000 |
| Subject: | RE: [PHP] URL modification | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-269843@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Xavier de Lapeyre [mailto:xavier@edsnetworks.net]
> Sent: Friday, February 22, 2008 2:09 AM
> To: php-general@lists.php.net
> Subject: [PHP] URL modification
> Importance: High
>
> Hi all,
>
> I saw on some websites that modifies the links to access the webpages.
>
> Something like:
> http://www.example.com/login/
> instead of
> http://www.example.com/login.php
>
> Does anyone knows how this works or how its call / which PHP library
> performs this action?
>
>
> Xavier de Lapeyre
That's called "URI/URL Routing" and it's usually performed as part of every MVC
Framework I know of (CodeIgniter, CakePHP, Symfony, Zend Framework... just to
name a few). It's usually implemented through Apache's mod_rewrite module, but
you can get close without that module, if you allow for something like:
http://www.example.com/index.php/myaccount/profile
(that is, you don't need
mod_rewrite unless you want to remove the index.php part of the URI path)
However, if you have an existing website, migrating it to use one of the MVC
frameworks (or just using a stand-alone URI Routing class) may not be the path
you want to follow.
Regards,
Rob
Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 |
Email: info@bestplace.net | MSN Chat: best@bestplace.net | SKYPE: bestplace |
Web: bestplace.biz | Web: seo-diy.com