.htaccess question...

Discussion in 'Apache' started by grahamsmythe, Dec 22, 2008.

  1. #1
    At the moment we have an .htaccess file in our root directory as follows...

    Redirect 301 /index.html http://www.ourdomain.com/forum
    php_flag display_errors on
    php_value error_reporting 7

    Obviously when someone goes to www.ourdomain.com it redirects them to www.ourdomain.com/forum

    What we'd like to do is the following:
    1. When someone goes to www.ourdomain.com, it redirects them to www.ourdomain.com/forum/flashchat.php
    2. Then, open a brand new window and go to www.ourdomain.com/forum

    They would then have a flashchat.php window open in the background and a forum window open in the foreground.

    Anyone got any ideas how we could achieve this?
     
    grahamsmythe, Dec 22, 2008 IP
  2. phper

    phper Active Member

    Messages:
    247
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    You'll have to use javascript's window.open()
     
    phper, Dec 22, 2008 IP
  3. grahamsmythe

    grahamsmythe Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I've used the following code, but get an error - any ideas?


    window.open ("http://www.ourdomain.com/forum/chat/flashchat","location=1,status=1,scrollbars=1,width=100,height=100");
    
    Redirect 301 /index.html http://www.ourdomain.com/forum
    php_flag display_errors on
    php_value error_reporting 7
    
    PHP:
     
    grahamsmythe, Dec 23, 2008 IP
  4. phper

    phper Active Member

    Messages:
    247
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #4
    The JavaScript code is to be placed in your flashchat.php file. Somewhere where you echo out the HTML output.

    <script type="text/javascript">
    window.open ("http://www.ourdomain.com/forum/chat/flashchat","location=1,status=1,scrollbars=1,width=100,height=100");
    </script>
    Code (markup):
     
    phper, Dec 23, 2008 IP