You are here: Re: Help getting URL? « PHP Programming Language « IT news, forums, messages
Re: Help getting URL?

Posted by Mateusz Markowski on 11/11/06 10:59

brett napisal(a):
> I may post the URL of a post on my blog at some one else's blog. The
> URL is
>
> blog/index.php/2006/10/23/application-software
>
> but is cut after being posted
>
> blog/index.php/2006/10/23/application
>
> I'm trying to catch this and redirect to the first URL. However, I
> can't figure out how to get the correct URL. I've tried:
>
> $_SERVER['PHP_SELF']
> blog/index.php
>
$_SERVER["REQUEST_URI"]

> $_SERVER['HTTP_REFERER']
> this gives the URL of the statcount script I'm using
>
> Any suggestions?
>

If you have such address: blog/index.php/2006/10/23/application, the
request that will be sent to your server will look like this:
/index.php/2006/10/23/application
so your server won't know that user wants:
/index.php/2006/10/23/application-software

 

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

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