php - how to use rewirecond for exclusion a special page from rewrite rule in htaccess file? -
php - how to use rewirecond for exclusion a special page from rewrite rule in htaccess file? -
i utilize below rule in mvc project redirecting index.php
:
rewriterule ^(.*)$ index.php?url=$1 [qsa,l]
but want exclude pages rule, how can this?
for illustration don't want below page redirect:
http://www.my_domian/public/checkeditor/kcfinder/browse.php?opener=ckeditor&type=images&ckeditor=des&ckeditorfuncnum=1&langcode=fa
you can add together negative status before rewriterule
:
directoryindex index.php rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{the_request} !/public/checkeditor/kcfinder/browse\.php\?opener=ckeditor&type=images&ckeditor=des&ckeditorfuncnum=1&langcode=fa [nc] rewriterule ^(.+)$ index.php?url=$1 [qsa,l]
also have added 2 conditions avoid routing real files , directories.
php .htaccess mod-rewrite
Comments
Post a Comment