问题
I've moved WordPress from hosts to Xampp local hosts.
I corrected the links inside the database. Although the home page is loaded. But on every link, I'm redirected to the http: // localhost / dashboard page.
I use WordPress 4.9.6, Xampp 3.2.2 and Windows 8.1 64-bit
my .htaccess file
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
please guide me, thanks
回答1:
Try this:
Go to htaccess file.
Inside
<IfModule mod_rewrite.c>
...
</IfModule>
Put this code RewriteRule . FOLDERNAME/index.php [L]
回答2:
For me, changing the .htaccess
file as @Ustav suggested did not resolve the issue. After making that change, while I was no longer redirected to the XAMPP dashboard, I was instead redirected to a 404 page from Apache.
What did resolve the issue for me was simply navigating to Settings > Permalinks in the WP admin, scrolling to the bottom, and clicking "Save Changes", an idea I got from this WP forum page. That immediately fixed it, no changes to .htaccess
required.
The remote-to-local transfer instructions I followed can be found on this 1&1 Ionos instruction doc
来源:https://stackoverflow.com/questions/52238826/links-redirect-to-dashboard-xampp