You are here: Re: Modifying and posting uri « PHP Programming Language « IT news, forums, messages
Re: Modifying and posting uri

Posted by Jerry Stuckle on 05/05/07 15:48

Jon Slaughter wrote:
> "Jon Slaughter" <Jon_Slaughter@Hotmail.com> wrote in message
> news:UBX_h.21049$Um6.17337@newssvr12.news.prodigy.net...
>> How can I take a uri passed to a interface script(a script that is called
>> for every page request) modify it, do whatever, and then change the uri
>> that the user see's to be whatever?
>>
>> Essentially I have a rewrite rule
>>
>> RewriteRule ^(.*)[/]?$ /Index\.php
>>
>> That calls index.php
>>
>> I can do $_Server['REQUEST_URI'] to get the uri but how can I modify the
>> browser's uri that the user see's but also redirect the uri to something
>> different.
>>
>> Basically I sorta want to write a rewrite handler of my own because I'm
>> having a few issues with it. I'd rather use php to deal with it if
>> possible.
>>
>> Thanks,
>> Jon
>>
>
> Essentially what I would like to do is modify the uri with something like
>
> $_Server['REQUEST_URI'] = '/MyPage/';
>
> (as an example)
>
> and it update the browsers uri but not effect anything else. (ofcourse if
> they uset that uri I will need to make sure it maps to something)
>
> I know I can use rewrite rules and I'm trying to I am having more problems
> with them than it should be and I can handle it a lot easier in php(And
> atleast debug it so I know why things are failing).
>
>

You'll have to do this from the Apache end, not the client or your script.

The URI in the browser is what the browser uses to request the page.
You can't just change it without affecting what the browser requests.
So you'll have to have Apache change the request to something different.

You might be able to get some help in alt.apache.configuration.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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