.htaccess & WordPress: Exclude folder from RewriteRule

前端 未结 17 1493
不思量自难忘°
不思量自难忘° 2020-11-29 06:37

I have this .htaccess file in WordPress. It\'s located at /public_html/ (web root). I need to exclude a folder (csNewsAd) from the rewrite engine. I\'ve tried this, based fr

17条回答
  •  攒了一身酷
    2020-11-29 07:21

    you could add something like this:

    RewriteCond %{REQUEST_URI} !^/csNewsAd 
    

    but this should not be needed, because if csNewsAd indeed is a directory (folder) it should not be rewritten in the first place because of

    RewriteCond %{REQUEST_FILENAME} !-d
    

    are you sure there isn't anything else sitting between you and that folder, rights or (indeed) another .htaccess?

提交回复
热议问题