I'm trying to implement the following URL structure using .htaccess:
User sees:
http://domain.com/layer1/layer2/
Server sees:
http://domain.com/index.php/layer1/layer2
Ive managed to get this working with the following .htaccess file:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
HOWEVER - inevitably, this rewrites the URL of everything its given.
How would I add an exception? For example, I want a way of expressing
this:
IF url = http://domain.com/forum/ THEN open the 'forum' folder.
ELSE process the rule above (ie, drop 'index.php' into the URL)
Anyone know of a way of doing this? Can it be added to the .htaccess
file I already have, or am I looking like having to find a different
way around it?
- Chris
On Jun 5, 11:55 am, mou <mou.me...@googlemail.com> wrote:
> Hi
>
> I'm trying to implement the following URL structure using .htaccess:
>
> User sees:http://domain.com/layer1/layer2/
>
> Server sees:http://domain.com/index.php/layer1/layer2
>
> Ive managed to get this working with the following .htaccess file:
>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
>
> HOWEVER - inevitably, this rewrites the URL of everything its given.
>
> How would I add an exception? For example, I want a way of expressing
> this:
>
> IF url =http://domain.com/forum/ THEN open the 'forum' folder.