Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is my .htaccess for simple url rewriting for any MVC architecture.

Options +FollowSymlinks

RewriteEngine On
RewriteBase /personal/site/

RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 

Every thing is working only one exception rises. On the root where index.php exists i created a file generator.js, i also do have a controller named generator.

So for a request, http://localhost/personal/site/generator/css,

it must rewrite it to http://localhost/personal/site/index.php/generator/css

But it is rewriting it to http://localhost/personal/site/generator.js/css

How to resolve this scenario?

share|improve this question
There is only one rewrite rule in your question and it can't produce the effect you describe. You might want to have a look around for another rewrite rule. – Ladadadada Dec 27 '11 at 11:40
Can you please suggest me what other rule i should add to get my effect? – Nazar Hussain Dec 27 '11 at 12:10

I got solution from stack-overflow and the solution is to Turn of multiviews.

Options -MultiViews

This solved the problem.

The credit goes to

share|improve this answer

Your Answer


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.