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 |2 Answers
Reset to default 1Your .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:
SITEURL and Home in database table wp_options
settings in wp-config.php
To learn more about check WordPress documentation
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745650503a4638235.html
.htaccess
in the root dir? Or some too cramped SSLRewriteRule
? Or you site's Apache conf? – norman.lol Commented Mar 27, 2019 at 17:29