最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

redirect - Error in blog redirection - ubuntu default WP installation

programmeradmin0浏览0评论

I have installed WP from the Ubuntu repositories (18.04) and the domain I got was something like (notice the blog at the end).

After some tries to perform a new domain redirect (e.g. www.example to redirect to I think I did something wrong and broke the /blog, meaning that redirects to showing the Apache index.php. Nevertheless .html works just fine.

I checked the browser logs and the /blog page raised a 301 error, thus it was redirected to root.

My htaccess is the following:

<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>

, which I think it is the default for the Ubuntu installation.

Also in wp-admin/ general options, both URLs are set to

Thanks in advance!

I have installed WP from the Ubuntu repositories (18.04) and the domain I got was something like http://snf-XXXXX.vm.okeanos.grnet.gr/blog (notice the blog at the end).

After some tries to perform a new domain redirect (e.g. www.example to redirect to http://www.example/blog I think I did something wrong and broke the /blog, meaning that http://www.example/blog redirects to http://snf-XXXXX.vm.okeanos.grnet.gr showing the Apache index.php. Nevertheless http://www.example/blog/wp-admin/index.html works just fine.

I checked the browser logs and the /blog page raised a 301 error, thus it was redirected to root.

My htaccess is the following:

<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>

, which I think it is the default for the Ubuntu installation.

Also in wp-admin/ general options, both URLs are set to http://www.example/blog

Thanks in advance!

Share Improve this question asked May 19, 2020 at 7:23 Manos TsardouliasManos Tsardoulias 1
Add a comment  | 

1 Answer 1

Reset to default 0

It was the Chrome cache... Steps to solve if anyone else stumbles on this: https://www.ryadel/en/clear-google-chrome-redirect-cache-for-single-url-page-howto/

发布评论

评论列表(0)

  1. 暂无评论