我最近将以下命令添加到我的htaccess文件中:
Redirect 301 /stop-saying-i-have-a-boyfriend http://lunalunamag.com/2013/09/05/stop-boyfriend/
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
从那时起,我的子域名显示403被禁止。 (例如:http://crystal.eberhardtsmith.com)
感谢您的帮助!
答案 0 :(得分:0)
你的规则如下:
RewriteEngine On
RewriteRule ^stop-saying-i-have-a-boyfriend http://lunalunamag.com/2013/09/05/stop-boyfriend/ [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1\.html -f [NC]
RewriteRule ^(.+?)/?$ /$1.html [L]