求.htaccess转Nighx .conf
deny from allOptions -Indexes
AuthUserFile /home/高墙/public_html/.htpasswd
AuthGroupFile /dev/null
AuthName "Please scan your Fingerprint!"
AuthType Basic
require valid-user
order deny,allow
allow from 1.1.1.1
allow from 2.2.2.2
deny from all
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ -
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
# END WordPress
头晕。楼下会的话帮忙下。看到代码我晕了 高手搞吧。 不懂 帮顶下 不会 楼下来 楼下来 本帖最后由 快乐为本 于 2013-5-31 21:10 编辑
好像这样:
WordPress:
location / {
index index.html index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
WordPress在二级目录:
location /wp {
if (-f $request_filename/index.php) {
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite ^/wp/(.*)$ /wp/index.php;
}
}
里面的wp改成你的二级目录名称
[*] if (-f $request_filename/index.html){
[*] rewrite (.*) $1/index.html break;
[*] }
[*] if (-f $request_filename/index.php){
[*] rewrite (.*) $1/index.php;
[*] }
[*] if (!-f $request_filename){
[*] rewrite (.*) /index.php;
[*] }复制代码
页:
[1]