.htaccess - htaccess redirect if URI contains string to index.php -
i redirect link http://example.com/asdasdas/edit http://example.com/asdasdas/index.php/edit using htaccess. did this:
rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} edit rewriterule ^ %{request_uri}/index.php [l,r=301]
but it's loop , doesn't works well. ideas?
you can use rule in /asdasdas/.htaccess
:
rewriteengine on rewritebase /asdasdas/ rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule (.+) index.php/$ [l]
this support url of http://example.com/asdasdas/edit
Comments
Post a Comment