Score:0

Apache2 Redirect of django from .com to .one/.xyz

cn flag

What I want to do is the following:

I have a Django Site with different TLD (".com",".one",".xyz") pointing to same content.I am able to access individual site perfectly.

Now I want to do a simple redirect of "example.com" and "www.example.com" to "example.one". It should be a redirect, that also works when someone types in the browser bar http://example.com/team.php - then it should redirect to http://example.one/team.php

I've already tried a few things, but it didn't really work. What do I have to put in the Apache 2 config?

this is my .conf file of apache2

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined


        Alias /static /home/xram/one/static
        <Directory /home/xram/one/static>
                Require all granted
        </Directory>

        <Directory /home/xram/one/one_click>
                <Files wsgi.py>
                        Require all granted
                </Files>
        </Directory>

        WSGIScriptAlias / /home/xram/one/one_click/wsgi.py
        WSGIDaemonProcess one python-path=/home/xram/one python-home=/home/xram/one/venv
        WSGIProcessGroup one
        Redirect 301 / http://exampleone.com/
</VirtualHost>
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.