【问题标题】:I need rewrite .htaccess url old to new help me我需要将旧的 .htaccess url 重写为新的帮助我
【发布时间】:2017-02-15 08:10:49
【问题描述】:

我已将我的网址更改为 wordpress,但我遇到了一些错误。

带有一些图像并发布 ajax。我的新网址:http://practicetends.tempsite.ws/,但我有很多带有域名的图像是 www.practicetends.com.br 旧网址:www.praticetends.com.br 我需要将帖子 ajax 和图像重定向到新网址...我尝试 url 重写但不适合我!!!我试过了,还是不行

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^practicetends.com.br$
RewriteRule (.*) http://practicetends.tempsite.ws/$1 [R=301,L]
</IfModule>

【问题讨论】:

    标签: php ajax wordpress .htaccess mod-rewrite


    【解决方案1】:

    这行不通。如果域指向同一服务器/虚拟主机,您可以使其工作。我建议您使用 https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ 搜索旧 URL 并将其替换为新 URL。

    您可以进行试运行,看看会发生什么变化。

    【讨论】:

      猜你喜欢
      • 2013-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多