Jump to content

opening a website with the selected language in a separate directory


Recommended Posts

Hello.
I ran into a problem, I didn't find an answer on the community.
whmcs with multilanguages works on one common directory: domain.net
I need the selected language to work with the language directory, for example: domain.net/de/
Please tell me how this can be done? Maybe there is a ready-made solution?

Link to comment
Share on other sites

9 hours ago, pRieStaKos said:

Have you tried .htaccess like this ?

RewriteEngine On
RewriteCond %{QUERY_STRING} ^lang=de$
RewriteRule ^$ /de/? [R=301,L]
 

Hello. Thank you, but unfortunately, that won't work. Additionally, I need support for multiple languages, not just one.

Link to comment
Share on other sites

  • 3 weeks later...

I'm trying to write the code in .htaccess:

RewriteRule ^([a-z]{2})/?$ index.php?language=$1 [L,QSA]

To display the link domain.com/de instead of the address domain.com/index.php?language=de. However, unfortunately, the site shows a 404 error page.

The same situation happens with Knowledgebase and Announcements. I assume this is due to internal link routing.

Please advise if it's possible and, if yes, how to make the necessary changes?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated