installation - Wordpress in subfolder dont work

we have wordpress main site on domain now we did copy of the site and put in the sub-folder domainblogwe did all nece

we have wordpress main site on domain now we did copy of the site and put in the sub-folder domain/blog we did all necessary url changes. but it seems we have issues with .htaccess file.. the domain/blog is redirected to domain

this is what .htaccess in root

# 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

this is what .htaccess in /blog folder

# 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

whats wrong with them? thanks a lot

we have wordpress main site on domain now we did copy of the site and put in the sub-folder domain/blog we did all necessary url changes. but it seems we have issues with .htaccess file.. the domain/blog is redirected to domain

this is what .htaccess in root

# 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

this is what .htaccess in /blog folder

# 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

whats wrong with them? thanks a lot

Share Improve this question edited Mar 28, 2019 at 10:30 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Mar 27, 2019 at 8:43 AdamoAdamo 2
  • 1 WordPress have this well documented: codex.wordpress/Giving_WordPress_Its_Own_Directory – Kinnectus Commented Mar 27, 2019 at 9:16
  • Maybe you left the old .htaccess in the root dir? Or some too cramped SSL RewriteRule? Or you site's Apache conf? – norman.lol Commented Mar 27, 2019 at 17:29
Add a comment  | 

2 Answers 2

Reset to default 1

Your .htaccess looks just fine, but you need to tell WordPress itself that it got moved. Simply put the following line into your wp-config.php, then access your site's login page under the new URL and login. After that you can remove this line.:

define('RELOCATE', TRUE);

Alternatively add the following two lines to your wp-config.php, then navigate through the site a few pages far, then you can remove these lines.

define('WP_HOME', 'http://domain/blog');
define('WP_SITEURL', 'http://domain/blog');

Source: Changing The Site URL.

You need to Re-Check following two:

  1. SITEURL and Home in database table wp_options

  2. settings in wp-config.php

    To learn more about check WordPress documentation

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745650503a4638235.html

相关推荐

  • installation - Wordpress in subfolder dont work

    we have wordpress main site on domain now we did copy of the site and put in the sub-folder domainblogwe did all nece

    4小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信