Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I call my site this way locally:

http://localhost:80/mysite/de/layer1/layer2/module

In .htaccess I have:

RewriteEngine on

RewriteRule !^((css|js|images)/.*)$ index.php%{REQUEST_URI} [L, NE]

I try to rewrite that into:

http://localhost:80/mysite/index.php/de/layer1/layer2/module

Any idea what's wrong there?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

First thing I can see is that the path should be mysite/index.php

Probably also have to remove the \mysite\ from your regex because as it is now your REQUEST_URI is going to include mysite\xxxxx

You should probably use a rewrite condition to skip css,images, etc and then rewrite like this

RewriteRule (.*) /mysite/index.php/$1
share|improve this answer

If your server is throwing errors at you, you should look in the server log to see why. You can also enable logging of RewriteRule processing, see the docs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.