I have designed a simple site in Django. The web addresses I personally use are http::/www.example.com/nl/ and http://www.example.com/fr/.
My Django web addresses.py has got the following line:
In example.sights.index I look into the language parameter. Whether it's 'nl' I show a template. Whether it's 'fr', I show another template.
This labored great. The customer made two different web addresses:
And lastly I'll request the question:
It is possible to way that i can make use of the new web addresses without altering my django code? I suppose I will tell apache to provide the http://www.example.com/nl/ page once the user would go to http://www.dutch.com/. But how do you do that? And can django still have the ability to obtain the 'language' parameter in the url?
Thanks ahead of time for just about any solutions.
If you're able to use .htaccess files on http://www.dutch.com which you can use apache's redirect directive like so
redirectMatch 301 ^(.*)$ http://www.example.com/nl/
This can redirect all demands delivered to nederlander.com to example.com/nl
You might use
redirect 301 /index.html http://www.example.com/nl/
This can redirect only "index.html" on nederlander.com to example.com/nl/ (observe that the very first parameter is really a path and should not be an URL - no http://www)