【问题标题】:links redirect to dashboard xampp链接重定向到仪表板 xampp
【发布时间】:2019-02-13 18:27:00
【问题描述】:

我已将 WordPress 从主机移至 Xampp 本地主机。

我更正了数据库中的链接。虽然主页已加载。 但是在每个链接上,我都被重定向到 http://localhost/dashboard 页面。

我使用 WordPress 4.9.6、Xampp 3.2.2 和 Windows 8.1 64 位

我的 .htaccess 文件

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

请指导一下,谢谢

【问题讨论】:

  • 我找到了答案 RewriteRule 。文件夹名/index.php [L]

标签: wordpress redirect xampp dashboard permalinks


【解决方案1】:

对我来说,按照@Ustav 的建议更改.htaccess 文件并不能解决问题。进行此更改后,虽然我不再被重定向到 XAMPP 仪表板,而是被重定向到 Apache 的 404 页面。

为我解决了这个问题只是简单地导航到 WP 管理员中的 Settings > Permalinks,滚动到底部,然后点击“Save Changes”,一个想法我来自this WP forum page。这立即修复了它,无需更改 .htaccess

我遵循的远程到本地传输说明可以在this 1&1 Ionos instruction doc找到

【讨论】:

    【解决方案2】:

    试试这个:

    转到 htaccess 文件。

    里面

    <IfModule mod_rewrite.c>
    ...
    </IfModule>
    

    把这段代码 重写规则。文件夹名/index.php [L]

    【讨论】:

    • 对我来说,/dashboard 页面不再显示,而是我从 Apache 获得了 404,所以它并没有完全解决问题
    猜你喜欢
    • 1970-01-01
    • 2021-01-09
    • 2020-11-09
    • 1970-01-01
    • 2023-04-06
    • 2018-03-19
    • 2017-06-28
    • 2018-05-13
    相关资源
    最近更新 更多