Rewriting URL for SEO purposes
-
Hello,
I am working on a multilingual website. To determine which language needs to shown, I pass the variable
$taal
in the URL. (“taal” is Dutch for “language)Examples:
1) https://ruylclassics.nl/menu/?taal=NL
2) https://ruylclassics.nl/ClassicCars/mercedes-500sl-r107-oktober-1981/?taal=NLNow I would like to have these URLs rewritten:
1) https://ruylclassics.nl/NL/menu/
2) https://ruylclassics.nl/NL/mercedes-500sl-r107-oktober-1981/At 1) the variable before the page name (can be other pages) and
at 2) the slug ‘Classic Cars’ (CTP) must disappearI’ve tried a lot of stuff (editing .htacces, add_rewrite in functions.php, …), I’m Googling all day, but unfortunately without success.
This is at the bottom of my .htacces-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
Can anyone help me please? I would be very grateful!
Kind regards, Bart
- The topic ‘Rewriting URL for SEO purposes’ is closed to new replies.