Reputation: 4603
My .htaccess file now looks like (and nothing else):
DirectoryIndex index.php
RewriteEngine on
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=(.*)$
RewriteRule ^$ test.php$1 [QSA,L]
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
When i am trying to request this url: http://example.com/test?_escaped_fragment_=blog=123&ggg=3
I am see html from test controller, not my test.php file. Please help, what i am doing wrong?
Upvotes: 1
Views: 1229
Reputation: 785008
Change your first rule to:
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=(.*)$
RewriteRule !^test\.php$ test.php [L]
Upvotes: 2