• Hello,

    I would like that the url : mywebsite.com/en/homepage-en/ has the url : mywebsite.com/en
    so I wrote the next rules in .htaccess :

    # 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/homepage-en/$ /en [L]
    </IfModule>

    Where is my mistake ?
    Thanks for your help

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator t-p

    (@t-p)

    Try this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /en/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /en/index.php [L]
    </IfModule>

    Thread Starter n0wmi

    (@n0wmi)

    Thanks a lot but it doens’t work. Because I have the url : mywebsite.com and mywebsite.com/about and mywebsite.com/de/homepage etc …
    I just would like that on the mywebsite.com/en/homepage-en it to be mywebsite.com/en
    and on the : mywebsite.com/de/homepage-de it to be mywebsite.com/de
    And don’t touch the others pages.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘RewriteRule .htaccess’ is closed to new replies.