Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress htaccess不使用子目录安装_Wordpress_.htaccess_Redirect_Root_Subdirectory - Fatal编程技术网

Wordpress htaccess不使用子目录安装

Wordpress htaccess不使用子目录安装,wordpress,.htaccess,redirect,root,subdirectory,Wordpress,.htaccess,Redirect,Root,Subdirectory,我将我的wordpress站点移动到了一个新服务器-复制/粘贴内容 现在在服务器上有一个结构:public_html/myinstall 在“myinstall”中有wordpress 在任何情况下,我都无法工作,访问根域将显示wordpress内容 我试过(除其他外): 重新启动发动机 重写基/ RewriteCond%{REQUEST_URI}^/myinstall/(.*)$ 重写规则^.*$-[L] 我还尝试从以前的服务器复制/粘贴htaccess,但没有成功 我设法修复了它,我在子

我将我的wordpress站点移动到了一个新服务器-复制/粘贴内容

现在在服务器上有一个结构:public_html/myinstall

在“myinstall”中有wordpress

在任何情况下,我都无法工作,访问根域将显示wordpress内容

我试过(除其他外):


重新启动发动机
重写基/
RewriteCond%{REQUEST_URI}^/myinstall/(.*)$
重写规则^.*$-[L]
我还尝试从以前的服务器复制/粘贴htaccess,但没有成功

我设法修复了它,我在子目录中输入了一个错误:/抱歉,浪费了您的时间

RewriteEngine on
RewriteCond %{HTTP_HOST} ^myinstall$ [NC,OR]
RewriteCond %{HTTP_HOST} ^myinstall$
RewriteCond %{REQUEST_URI} !myinstall/
RewriteRule (.*) /myinstall/$1 [L]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
重新编写引擎打开
RewriteCond%{HTTP_HOST}^myinstall$[NC,或]
重写cond%{HTTP_HOST}^myinstall$
重写cond%{REQUEST_URI}!myinstall/
重写规则(.*)/myinstall/$1[L]
#开始WordPress
重新启动发动机
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
#结束WordPress

htaccess的这种结构可以吗?

您可以访问
wp admin
RewriteEngine on
RewriteCond %{HTTP_HOST} ^myinstall$ [NC,OR]
RewriteCond %{HTTP_HOST} ^myinstall$
RewriteCond %{REQUEST_URI} !myinstall/
RewriteRule (.*) /myinstall/$1 [L]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress