Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

.htaccess help

  • 24-06-2007 1:21pm
    #1
    Closed Accounts Posts: 19,080 ✭✭✭✭


    I have www.one.com. I'd currently have www.two.com parked on top of this.

    My problem is that I currently have
    RedirectMatch permanent ^/$ http://www.one.com/forum/siteindex.php
    
    in my .htaccess so everytime someone goes to www.two.com they're sent to one.com/forum instead of two.com/forum

    Can anyone tell me what I need to pop in?


    Thanks


Comments

  • Closed Accounts Posts: 1,200 ✭✭✭louie


    create an index.php file into the root of your domain and ad:
    [php]
    header("Location: http://www.two.com/forum");
    exit();
    [/php]
    and ad a # key in front of the rule you have in the .htaccess file.


  • Closed Accounts Posts: 19,080 ✭✭✭✭Random


    This is a completely different thing than I wanted to do - but thanks anyway.

    Maybe I explained it poorly. .. explanations aren't my strong point :)

    www.one.com/whatever directs a person to www.one.com/forum/whatever.php

    I would like www.two.com/whatever to direct a person to www.two.com/forum/whatever.php

    Both one.com and two.com are parked on the same hosting and should behave in the same way - with one.com staying in the address bar if you access via one.com and two.com staying in the address bar if you access via two.com

    There we go, I think I've confused myself now :D


    Any ideas?


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    Now that is better put. try this:
    Redirect 301 /whatever http://www.two.com/forum/whatever.php
    


  • Closed Accounts Posts: 19,080 ✭✭✭✭Random


    BAH! GRR! I can't explain it properly and I'm gonna put my fist through the monitor!

    If I put this in
    Redirect 301 /whatever http://www.two.com/forum/whatever.php
    
    then it will work fine if they goto http://two.com/whatever.

    But what if they goto http://one.com/whatever? It will redirect them to http://two.com/forum/whatever.php - I'd like them to be redirected to one.com/forum/whatever.php

    Any better?


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    you'll be better off looking into adding a 301 redirect to the index.php into the folder that you want to redirect, as it seems you are using domain alias .
    [php]
    if( stristr($_SERVER,'/whatever') ){
    header('HTTP/1.1 301 Moved Permanently');
    header('Location: ' .$_SERVER.'forum/whatever.php');
    exit();
    }
    [/php]


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,541 ✭✭✭irlrobins


    ciaranfo wrote:
    BAH! GRR! I can't explain it properly and I'm gonna put my fist through the monitor!

    No you made perfect sense the first time, louie was jsut leading you astray. What you need to do is to sort out your virtual hosting directives.

    Read this


Advertisement