• Resolved jwl

    (@jwl)


    I have a blog, with WordPress 2.6, running on my own server with Apache 1.3.29 and I want to have a vhost for my blog.
    Currently the blog has the URL https://sysctl.dk/blog/ and that should keep working. Then I want the domain interstellar.dk to act as a vhost for the blog directory.

    I have this in httpd.conf:

    NameVirtualHost *

    <VirtualHost *>
    DocumentRoot /var/www/htdocs/blog
    ServerName interstellar.dk
    ServerAlias interstellar.dk https://www.interstellar.dk
    </VirtualHost>

    But it seems it is not working, since WordPress want an exact URL for the blog and it cant handle more than one working URL at the same time.
    Some googling only got an old unmaintained plugin and some stuff with WordPress MU, which does not relate to my problem.

    Is this possible at all with WordPress? Thanx in advance for any suggestions.

Viewing 1 replies (of 1 total)
  • Thread Starter jwl

    (@jwl)

    I have sort of solved this by having this in the .htaccess file:


    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.sysctl\.dk$ [OR]
    RewriteCond %{HTTP_HOST} ^sysctl\.dk$
    RewriteRule ^(.*)$ https://interstellar.dk/$1 [R=301,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php [L]
    </IfModule>

    That permanently redirects all old URLs using sysctl.dk/blog/ to interstellar.dk

Viewing 1 replies (of 1 total)
  • The topic ‘vhost – two urls on one blog’ is closed to new replies.