RewriteRule in .htaccess based on language variable

I’ve a website which contains german as default language and english as alternative language. I want to redirect my rss url to another path in the website based on language condition.

I mean to in default case and to in the case of alternative language.

I’ve tried this in the following way, but it only respect the default case.

RewriteRule rss.xml$ /index.php?type=11 [L,R=301]
RewriteRule en/rss.xml$ /index.php?type=11&L=1 [L,R=301]

Can you guys please help me to achieve this?

Source: .htaccess

1 Comment

  1. Digin Dominic

    Try this :
    RewriteRule ^rss.xml$ /index.php?type=11 [NC,L,R=301]
    RewriteRule ^en/rss.xml$ /index.php?type=11&L=1 [NC,L,R=301]


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.