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?

link|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
feedback

1 Answer

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

Options -MultiViews

This solved the problem.

The credit goes to http://stackoverflow.com/users/567986/gerben

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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