You are here: Re: Explode + url faking problem « PHP Programming Language « IT news, forums, messages
Re: Explode + url faking problem

Posted by frizzle on 05/29/06 19:32

the DtTvB wrote:
> Let me guess it, you did mod_rewite
> RewriteRule ^/(.+?)$ index.php?$1
>
> Is that what you want?
> <?php
> $requested_page = $_SERVER['QUERY_STRING'];
> $requested_page = preg_replace('~/+~', '/', $requested_page);
> $requested_tree = explode('/', $requested_page);
> ?>
>
> I tested with
> http://localhost/test5.php?folder//////subfolder///yo///lol and it said
> that
> $requested_tree is Array (
> [0] => folder
> [1] => subfolder
> [2] => yo
> [3] => lol
> )

I have mod-rewrite:

RewriteBase /testfolder/
RewriteRule ^(index\.php)$ - [L]
RewriteRule ^(img|swf|js|css)/.*$ - [L]
RewriteRule ^(.*)$ index.php?$1 [L]

But this also still gives me problems as stated on
http://groups.google.com/group/alt.apache.configuration/browse_thread/thread/0bd6bc52b4feece4

Frizzle.

 

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

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