0

I just changed my permalink structure from

https://www.maleq.org/en/first-coming-british-royal-family/

to

https://www.maleq.org/first-coming-british-royal-family/

Removing the /en/ sub in the url. Now though all of my l=previous posted links on social media are broken and all of my google traffic does not get directed correctly. Therefore all links with the /en/ get a 404 page error.

I have tried to modify the .htaccess folder but I am not having much luck.

Any help is super appreciated!

2 Answers2

0

Replace with below.

# 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]
RewriteRule ^en/(.*)$ /$1 [R=301,NC,L]
</IfModule>
# END WordPress
Alex Rindone
  • 296
  • 2
  • 9
  • This is the source for my answer: https://coolestguidesontheplanet.com/redirecting-a-web-folder-directory-to-another-in-htaccess/ – Alex Rindone Oct 09 '16 at 03:44
  • Hey Thanks so much! I added it into my .htaccess file as follows. `# BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] RewriteRule ^en/(.*)$ /$1 [R=301,NC,L] # END WordPress` So far though I am still having no luck. I tried clearing my caches and waiting a bit too, but no luck yet. – Loren Couse Oct 09 '16 at 08:20
  • I updated my answer, are you able to format your the exact way it shows in your htaccess file? You are definitely in the right htaccess file and there isn't a duplicate? You could try have just that one line in there as a rewrite rule instead of the others and see what happens. If all else fails, use a plug in like this. They are great to have anyway :) https://wordpress.org/plugins/redirection/ – Alex Rindone Oct 09 '16 at 12:30
0

Thank you so much for the help.

Sadly after many tries I never hot the .htaccess file to work, but i did find a solution!

I used the "Simple 301 Redirects" plug-in.

I used /en/* is the example, then my url with an * like this https://www.MaleQ.org/*/ in the second box and chose "wildcards".

This seems to have fixed the problem.

Thank you so much for the help!