Reply to Re: Pretty URLs

Your name:

Reply:


Posted by David Quinton on 11/18/98 11:41

On 4 Mar 2006 19:03:03 -0800, "Laeronai" <wizzlefish@gmail.com> wrote:

>Wow that's a complex module....might take a while to understand.

It will do you good!

If you can't / won't use mod_rewrite, I've sometimes used a php
method to achieve the same end result.

Make directory / subdirectories to match the "user friendly" path that
you want people to see / enter.

Place an index.php in the lowest level directory which explodes the
$PATH_INFO into an array.
e.g. list (, $Var1, $Var2) = explode ('/',$PATH_INFO);

Form the "real" url by appending the elements
e.g. $realurl='http://www.mysite.com/myscript.php?firstget=' . $Var1 .
'&amp;secondget=' . $Var2 etc.

Then do a
header("location: $realurl");

You'll also need an .htaccess to
ForceType application/x-httpd-php
DirectoryIndex index.php



Now I've typed all this - you're probably better off with mod_rewrite!
--
Locate your Mobile phone: <http://www.bizorg.co.uk/news.html>
Great gifts: <http://www.ThisBritain.com/ASOS_popup.html>

[Back to original 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

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