Hi,
I've asked several persons, posted on a few very visited both french and english discussion boards, I couldn't have an answer.
The thing I want is to rewrite all the requested url, excepted for images, javascript and css, to index.php with getting everything that's not real (for example, "subfolder" contains the file, I submit the url ".../subfolder/word1/word2" and I get the string "/word1/word2"). I succeeded for most cases. /basesite/~accountdir/subfolder/contact/view/id/1 redirect to /basesite/~accountdir/subfolder/index.php, but when I replace "contact" with the word "index" (per example : "/basesite/~accountdir/subfolder/index/a_word/again/and_again"), everything bug.
I get the rewritted URL with the "$_SERVER['REQUEST_URI']" from PHP. In the first case, I have "/contact/view/id/1", but with "index" I have "/~accountdir/subfolder/index/a_word/again/and_again". The code is included in "index.php", located into the "subfolder" directory, with the .htaccess file.
Here is my .htaccess file :
RewriteEngine on
RewriteBase /~accountdir/subfolder
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
Does anyone see a solution?
Thanks.
EDIT : The code of index.php, to be clear :
/*
* Should return /keyword1/keyword2/keyword3, but returns
* /folder/subfolder/index/keyword2/keyword3 with "folder"
* at the root of the web directory and "index" as "keyword1"
*/
echo $_SERVER['REQUEST_URI'];
?>