Reply to How can I reliably get an html path with .htaccess 'RewriteBase'

Your name:

Reply:


Posted by FFMG on 04/27/07 09:16

Hi,

if I have a site

htt://www.example.tdl/folder1/folder2/page.html

I want to get the folders from the root, so the folder would be
$f = './folder1/folder2/'
and the page
$p = 'page.html'

I have 2 problems:
First if the user does not enter a page
htt://www.example.tdl/folder1/folder2/
How can I reliably get the folders and page?
$f = './folder1/folder2/'
$p = ''

And secondly if I use RewriteBase in my .htacess, (I do that a lot).
RewriteBase /folder1/

the user would enters still enter
htt://www.example.tdl/folder1/folder2/
but the 'root' folder would now be '/folder1/'

How can I then get the right path.
$f = './folder2/'
$p = ''

Because if I use $_SERVER['REQUEST_URI'] then it will return
$f = '/folder1/folder2/page.html'

Thanks.

FFMG


--

'webmaster forum' (http://www.httppoint.com) | 'webmaster Directory'
(http://www.webhostshunter.com/) | 'Recreation Vehicle insurance'
(http://www.insurance-owl.com/other/car_rec.php)
'Free URL redirection service' (http://urlkick.com/)
------------------------------------------------------------------------
FFMG's Profile: http://www.httppoint.com/member.php?userid=580
View this thread: http://www.httppoint.com/showthread.php?t=14214

Message Posted via the webmaster forum http://www.httppoint.com, (Ad revenue sharing).

[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

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