网站只提供了.htaccess,但是服务器是 nginx serve,所以要 convert, 一下是.htaccess 内容:
RewriteEngine On RewriteBase / RewriteRule ^(uploads/.?_\d+x\d+.(jpg|gif|png|jpeg))$ /image/index.php?$1 [L] <Files .> Order Deny,Allow Deny From All </files> RewriteRule ^(?:v5|modules|system)\b.* index.php/$0 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/(uploads|public|newtravel|phone|payment)(/)? RewriteRule .* index.php/$0 [PT]
求助懂得 Nginx rewrite 的给出 convert 后的配置
1
s609926202 OP # Turn on URL rewriting
RewriteEngine On # Installation directory RewriteBase / #mobile start #mobile end RewriteRule ^(uploads/.*?_\d+x\d+\.(jpg|gif|png|jpeg))$ /image/index.php?$1 [L] # Protect hidden files from being viewed <Files .*> Order Deny,Allow Deny From All </Files> # Protect application and system files from being viewed RewriteRule ^(?:v5|modules|system)\b.* index.php/$0 [L] # Allow any files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/(uploads|public|newtravel|phone|payment)(/)? #RewriteCond %{REQUEST_FILENAME} !-d # Rewrite all other URLs to index.php/URL RewriteRule .* index.php/$0 [PT] |
2
ahu 2017-06-16 15:47:50 +08:00
|