Viewing 5 replies - 1 through 5 (of 5 total)
  • spencerp

    (@spencerp)

    I’m not sure if this will help you at all or not, but Scotty helped me with my problem. Before I had my Blog at:

    domainname.com/blog

    And then moved it to the root here:
    domainname.com

    He told me to add this code within the .htaccess file under.

    Manage => Files => Common =(Click On This Link To Edit It)=> .htaccess (for rewrite rules)

    Add this:
    RewriteRule ^blog/(.*) https://www.yourdomain.com/$1 [R,L]

    Right Under This:
    RewriteBase /

    Of course replace that example url in there with your own. Then save it..make sure it’s writable and have one.

    Then anyone coming in on the old location domainname.com/blog would automatically take them to that location under the straight domainname.com

    But maybe it’s not what you’re looking for or something. At this time, mine works ok. But sometimes it’s quirky. I’ll have to check into it more then.. Good luck with your’s though. =)

    spencerp

    spencerp

    (@spencerp)

    Also, just as I said above, if you want the redirects to be from the domainname.com to the domainname.com/blog. I think you’d just have to reverse this line of code here to read:

    RewriteRule ^/(.*) https://www.yourdomain.com/blog/$1 [R,L]

    Instead of:

    RewriteRule ^blog/(.*) https://www.yourdomain.com/$1 [R,L]

    I think, I’m not sure though…but would only make sense to me.. =) Just follow the same steps above, just reverse the code for whatever you’re doing. And you can also add in more lines of it as well, just using different directories..

    Examples:

    RewriteRule ^blog1/(.*) https://www.yourdomain.com/$1 [R,L]

    RewriteRule ^plog/(.*) https://www.yourdomain.com/$1 [R,L]

    RewriteRule ^gallery/(.*) https://www.yourdomain.com/$1 [R,L]

    Depends on what directories you did have, and then removed. So they wouldn’t just be getting a blog’s 404 page, they’d be redirected to the index page of your choice. =) That’s what I did..

    spencerp

    Slaps self, I hope I’m posting legit stuff for you or whatever, cause I know you’re referring to forwarding, and I’m posting about redirecting.. :/

    moshu

    (@moshu)

    Spemcer, that’s different. What the OP wants – never really worked with WP. The OP talks about 2 domains: a new one which is redirected (never understood why ppl do this…) to olddomain/blog.
    Good luck; as I said I’ve never seen a working solution for it.

    spencerp

    (@spencerp)

    moshu, yeah..I just added that in a P.S. while you were replying.. =) Slaps self again.. well, atleast it’s some hopefully legit code for someone to use sometime maybe, for redirects. =)

    I’m going to bookmark this thread, just incase of future requests for redirects and what not.. =)

    spencerp

    Thread Starter occalion

    (@occalion)

    Yeah, what I want is forward my new domain name to an old domain’s subfold. And it must be a masked forward. Thanks for your reply ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP2 URL forwarding doesn’t work…’ is closed to new replies.