RewriteEngine on
RewriteCond %{REQUEST_URI} !^(/aaa/bbb)$ [NC]
RewriteCond %{SERVER_PORT} =80 [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [NC,L,R=301]
RewriteRule !\.(dfk|tsv|pdf|PDF|js|ico|gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|css|src|csv|txt|TXT|xml|XML|xls|XLS|php|PHP|json|ttf|woff|woff2|svg|swf|eot|htc|lic|mp4)$ index.php [NC,L]
当我使用 80 端口并且 URI 不为 /aaa/bbb 的时候 不跳转 https
这样写怎么直接跳到 https://www.test.com/index.php 上面了?
1
hiboshi OP 已经解决
加上 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f |