WordPress.org

Ready to get started?Download WordPress

Forums

Quick Page/Post Redirect Plugin
[resolved] Redirecting homepage alias (4 posts)

  1. Jokes1979
    Member
    Posted 1 year ago #

    Hi,

    I recently transferred my site http://www.digitale-media.be to http://www.thecontentfactory.be. Digitale-media.be is now an alias for thecontentfactory.be.

    I now want to redirect the url http://www.digitale-media.be automatically to http://www.thecontentfactory.be. How can this be done?

    I already tried this: http://img10.imageshack.us/img10/8255/redirect1b.jpg

    But when doing that, I received a 310 error when heading to http://www.thecontentfactory.be: http://img845.imageshack.us/img845/807/redirect2d.jpg

    Thank you for your help.

    http://wordpress.org/extend/plugins/quick-pagepost-redirect-plugin/

  2. prophecy2040
    Member
    Plugin Author

    Posted 1 year ago #

    The plugin is not really designed to forward an entire domain to another location, because there are far more efficient (and better) ways to do that - but if you need to for some reason or another, try using this in the redirect:
    /index.php
    and
    http://www.thecontentfactory.be
    for the destination.

    I am not entirely sure it will work, but you can try. If that does not work, then you will probably have to use something in the .htaccess file for the digital-media.be site (assuming you still have a WordPress site there and it is not just an alias). Search '.htaccess redirect one domain to another' on Google or Bing and you should be able to find an answer on how to achieve that with htaccess.

    If you are not keeping a website at the digital-media.be site, then you should be able to just set a forward up on the domain through your host/domain panel - that is by far the simplest and best way to forward a domain.

    Best of luck,
    Don

  3. Jokes1979
    Member
    Posted 1 year ago #

    Thanx for your quick reply, prophecy2040!

    I already tried your first suggestion (/index.php to http/www.thecontentfactory.be) but that doesn't work.

    The best solution I have so far is to put this code in the .htaccess file:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^digitale-media.be$ [OR]
    RewriteCond %{HTTP_HOST} ^www.digitale-media.be$
    RewriteRule (.*)$ http://www.thecontentfactory.be/$1 [R=301,L]
    </IfModule>

    The result is that when you type in http://www.digitale-media.be it gets redirected indeed to http://www.thecontentfactory.be and the homepage comes out as it should. BUT: when you click on a link, you get the error:

    Not Found

    The requested URL /headlines/goudengids-be-lanceert-gouden-talent-wedstrijd/ was not found on this server.

    Apache/2.2.9 (Debian) PHP/5.3.9-1~dotdeb.2 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g mod_perl/2.0.4 Perl/v5.10.0 Server at http://www.thecontentfactory.be Port 80

  4. Jokes1979
    Member
    Posted 1 year ago #

    Hi,

    I think I found a solution for my problem.

    I added this code to the .htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteCond %{HTTP_HOST} ^digitale-media.be$ [OR]
    RewriteCond %{HTTP_HOST} ^www.digitale-media.be$
    RewriteRule (.*)$ http://www.thecontentfactory.be/$1 [R=301,L]
    </IfModule>

    # END WordPress

    When you head over to http://www.digitale-media.be you get redirected to http://www.thecontentfactory.be, and you don't get an error no more when clicking on one of the articles.

    Plus: it looks that Google is indexing the new site as it should. Most of the digitale-media.be/*post-url's are being changed in thecontentfactory.be/*post-url's.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic