RewriteCond in .htaccess with negated regex condition doesn't work?

后端 未结 4 1974
野的像风
野的像风 2020-12-30 03:25

I\'m trying to prevent, in this case WordPress, from rewriting certain URLs. In this case I\'m trying to prevent it from ever handling a request in the uploads directory, an

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-30 04:23

    
    RewriteEngine On
    
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    RewriteCond %{REQUEST_URI} !^/wp-content/uploads/ [OR]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    RewriteRule . /index.php [L]
    
    

提交回复
热议问题