After moving website to my local dev machine, relative links stopped working. When i click button with relative link /login, for example, browser redirects to
and shows
Code: Not Found
The requested URL /index.php was not found on this server.
While it should have redirected to https://localhost/сс/login/
.htaccess contents on localhost :
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /cc/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cc/index.php [L]
</IfModule>
How to fix this issue?
Tried different .htaccess modifications, moving index.php to /var/lib Nothing helps.
just use WP Migrate DB plugin for database export , it will change all link to your desire link and use this database export file in live site
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.