Announcement

Collapse
No announcement yet.

Basic PHP "header Location:" problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Basic PHP "header Location:" problem

    1 of my current websites is just a forum but with additional files scattered here there and everywhere on the server. To keep things seperate i use a subdomain and all files for vb are there (ie vb.mydomain.com).

    I'm using a basic php script to send people who type mydomain.com or http://www.mydomain.com to vb.mydomain.com
    (file named index.php)
    PHP Code:
    <?php
    header
    ("Location: http://vb.mydomain.com");
    exit;
    ?>
    That was working fine until today but now only a blank page is displayed with the message 'done' in the ie status bar. Also, another time it asked me to download a file.

    I tested my vbboard by using entering subdomain url directly and it still works fine including the header "location:" refresh pages (like when you post) that vb3 uses.

    Two questions
    1) Is this a problem with php settings that can cause this? I've had problems with servers in the past who just seem to like changing the php settings randomly !
    2) Is there a way round it? I'm not so fond of meta refresh tags.

  • #2
    Consider using the apache mod_rewrite, it's very efficient and is perfect for this... though I'll admit that even with the documentation it's not the friendliest thing to work with.
    London Fixed-gear and Single-speed

    Comment


    • #3
      Try using just this, as I'm not sure what the exit's for...

      PHP Code:
      <?php header("location:http://vb.mydomain.com"); ?>

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X