Wordpress迁移和htaccess文件
我需要将wordpress从迁移到 我有如下htaccess文件。如果我改变了,对吗Wordpress迁移和htaccess文件,wordpress,.htaccess,Wordpress,.htaccess,我需要将wordpress从迁移到 我有如下htaccess文件。如果我改变了,对吗 RewriteBase/blog/到RewriteBase/ 重写规则/blog/index.php到重写规则/index.php 我的.htaccess代码 # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /blog/ RewriteRule ^index\.php$ - [L] RewriteCo
到RewriteBase/blog/
RewriteBase/
到重写规则/blog/index.php
重写规则/index.php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
#开始WordPress
重新启动发动机
重写库/博客/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/blog/index.php[L]
#结束WordPress
不幸的是,这并不像更改.htaccess文件那么简单
从:
当您的域名或URL更改时-即从
或
到-还有其他问题。文件和
数据库可以移动,但引用旧域名或
位置将保留在数据库中,这可能会导致
链接或主题显示
最重要的更改是更改“wp_选项”表中的“siteurl”和“home”以指向您的新地址,这让很多人感到困惑。只需使用迁移插件,如导出数据库即可。 完成DB导入后,不要忘记转到设置->永久链接,只需点击保存按钮,即可更新
.htaccess
完成。是的,您可以将以下内容添加到htaccess文件中。如果要将wordpress从迁移到
#开始WordPress
重新启动发动机
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
#结束WordPress
注意您还必须更改数据库中的URL
如果要将wordpress从迁移到。您可以使用followin插件进行迁移
# 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