I updated a website but the links doesn't work properly anymore. I have some urls but they don't work anymore:
http://www.mysite.eu/fr/some-page
http://www.mysite.eu/fr/some-page1
http://www.mysite.eu/fr/some-page2
Is it possible to redirect the page when there is an /fr/
in the url?
I've tried
Redirect 301 /fr/ http://www.mysite.eu/
but that only strips the /fr/
.
Great! So if you have mod_rewrite
activated you can rewrite the broken links, instead of redirecting them
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^fr/(.)*$ / [R=301,NC,L] # Added line
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With