subdomain redirect

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jobe
    Member
    • Oct 2004
    • 50

    #1

    subdomain redirect

    Hi - have just converted my phpBB forum to smf - all went fine. The original & the new were/are in the subdomain - http://forum.mysite.com

    Now I have lots of links on my site directed to the phpBB installation. How might I redirect eg:

    to


    Just so that they end up on the index page of the new forum. They will have to find their way from there.

    Any thoughts appreciated. Thanks.
  • AndrewT
    Administrator
    • Mar 2004
    • 3655

    #2
    If SMF does not have a viewtopic.php then I would simply create one that redirects to the index.php. Otherwise a find/replace throughout your site might not be a bad idea either.

    Comment

    • jobe
      Member
      • Oct 2004
      • 50

      #3
      Thanks Andrew.

      You say 'If SMF does not have a viewtopic.php then I would simply create one that redirects to the index.php' but how would you do that?

      In the redirect section of cpanel - redirects are from http://mysite.com - not from the subdomain - http://forum.mysite.com

      Have tried with mysite/forum/viewtopic.php but doesn't seem to work.

      Comment

      • AndrewT
        Administrator
        • Mar 2004
        • 3655

        #4
        Create a viewtopic.php file with the following code in it:
        Code:
        <?PHP
        header ("Location: http://forum.mysite.com");
        ?>

        Comment

        • jobe
          Member
          • Oct 2004
          • 50

          #5
          Thanks Andrew.
          Works fine for viewtopic.php but not for the



          Strange as the error says 'The requested URL /viewtopic.php was not found on this server.'

          Comment

          • AndrewT
            Administrator
            • Mar 2004
            • 3655

            #6
            I'm not quite sure I understand. Creating a viewtopic.php script with that code will redirect anything that is sent to the viewtopic.php script, including viewtopic.php?t=1191. It completely ignores the thread ID and any GET/POST values that might be sent.

            Comment

            • jobe
              Member
              • Oct 2004
              • 50

              #7
              Sorry Andrew - I wasn't putting the viewtopic.php in the forum folder.

              Many thanks for your help. Much appreciated.

              Comment

              • AndrewT
                Administrator
                • Mar 2004
                • 3655

                #8
                No problem at all.

                Comment

                • Pedja
                  Senior Member
                  • Mar 2004
                  • 329

                  #9
                  Cjeck this out: http://www.simplemachines.org/commun...topic=120863.0
                  I posted set of php scripts that reroute requests in phpbb syntax to smf.

                  Comment

                  • jobe
                    Member
                    • Oct 2004
                    • 50

                    #10
                    Thank you very much for the link.
                    SMF really is excellent so far - much better than phpbb in all aspects. For free forums, highly recommended.

                    Comment

                    Working...