You are here: Re: [PHP] Re: Can the URL be controlled for more user-friendly readability? [SOLVED] « PHP « IT news, forums, messages
Re: [PHP] Re: Can the URL be controlled for more user-friendly readability? [SOLVED]

Posted by Curt Zirzow on 12/27/05 01:31

On Mon, Dec 26, 2005 at 09:26:38PM +0900, Dave M G wrote:
>
> Thank you for the suggestions. Altering the rules of the Apache server
> seems to suggest the potential to have the effect I am after. I know
> nothing about configuring Apache, but I will try to learn.
> If my discovery process brings me back to PHP issues, then I will
> return here with more questions.
> I appreciate you taking the time to offer advice.

Another method that wasn't mentioned, which helps take the logic
needed to parse parameters in the more 'user-friendly' way is to
set up apache to treat a file as a directory so you could have:

http://domain.com/user/first.last.html

The 'user' is actually a file that is a php script that reads data
from $_SERVER['PATH_INFO'] and parses it as needed.

You just need to setup apache using:

<Files user>
SetHandler application/x-httpd-php
</Files>

and make a php script called user like:

<?php
var_dump($_SERVER['PATH_INFO'])'
?>

I prefer this method cause it removes any sort of programming logic
from apache, so if I decide, that well, i want to allow just
lastname.html, i only have one place to worry about the logic.


Curt.
--
cat .signature: No such file or directory

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация