简体   繁体   English

htaccess上传Wordpress时不会重定向

[英]htaccess does not redirect when uploading Wordpress

Yesterday, I uploaded a Wordpress site on " public_html/wordpress " folder for testing purpose. 昨天,我在“ public_html / wordpress ”文件夹中上传了一个Wordpress网站以进行测试。 It worked fine. 工作正常。 The URL was " mysite/wordpress ". 网址为“ mysite / wordpress ”。

But today, I deleted the " wordpress " folder, uploaded Wordpress src again to the upper level " public_html " folder. 但是今天,我删除了“ wordpress ”文件夹,再次将Wordpress src上传到上层“ public_html ”文件夹。 However when I went to " mysite.com ", it still redirects to " mysite/wordpress ". 但是,当我转到“ mysite.com ”时,它仍然重定向到“ mysite / wordpress ”。 And of course, a 404 error appears because I had previously deleted the " wordpress " folder. 当然,会出现404错误,因为我以前已经删除了“ wordpress ”文件夹。

Even if I typed " mysite.com/index.php ", it still redirected to the wrong place " public_html/wordpress " 即使我输入“ mysite.com/index.php ”,它仍然会重定向到错误的位置“ public_html / wordpress

This is ALL the content of the .htaccess file on " public_html ". 这是“ public_html ”上.htaccess文件的所有内容。

DirectoryIndex index.php

I'm completely new to wordpress, please helps me ASAP. 我是wordpress的新手,请尽快帮助我。

This is due to permalink configuration in Wordpress. 这是由于Wordpress中的永久链接配置所致。 If WP admin is loading then visit permalink setting page and change all links to remove /wordpress from URLs. 如果WP管理员正在加载,则访问permalink setting页面并更改所有链接以从URL中删除/wordpress

If WP admin is not coming up then via PHPMyAdmin update wp_options table to fix all URLs that have /wordpress in them. 如果不进行WP管理员,则通过PHPMyAdmin更新wp_options表以修复其中包含/wordpress所有URL。 ( option_id=39 is one of them). option_id=39是其中之一)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM