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

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

1 Answer 1

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

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.