Forums

WordPress and htaccess domain redirection, URL showed in address bar (3 posts)

  1. dada44
    Member
    Posted 3 years ago #

    Dear all,

    I have a domain, let's call it http://www.mydomain.com
    And I have a blog, let's call it http://www.myblog.com/myfolder/myslug

    As I need people to go to http://www.myblog.com/myfolder/myslug everytime they type http://www.mydomain.com, I have edited htaccess and added to the IfModule:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^.*mydomain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.myblog.com/myfolder/myslug? [R=301,L]

    And this words great. But in the address bar shows http://www.myblog.com/myfolder/myslug and I would like it to show http://www.mydomain.com .. How can I do this???

    Thanks a lot in advance!

  2. Ragster
    Member
    Posted 3 years ago #

    If I was you I'd use a cloaked redirect on your homepage and not go down the htaccess route at all

    Just my 2c!

  3. dada44
    Member
    Posted 3 years ago #

    But the URL in the address bar changes ... and I need it to show http://www.mydomain.com :((

Topic Closed

This topic has been closed to new replies.

About this Topic