$_SERVER['REQUEST_URI'] and mod_rewrite
Posted: Thu Jan 24, 2008 4:18 am
Hi
I have an .htaccess file
when I'm trying to get pahe http://cms/guestbook/index/
I have such result
Why do I have this empty elements, i think that is because folders? What I have to do to delete this elements?
I have an .htaccess file
Code: Select all
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php [L,QSA]I have such result
Code: Select all
$url = explode ('/', $_SERVER['REQUEST_URI']);
echo '<pre>';
print_r($url);
echo '</pre>';Code: Select all
Array
(
[0] =>
[1] => guestbook
[2] => index
[3] =>
)