Results 1 to 8 of 8

Thread: About to move a SMF to RedFox

  1. #1
    Join Date
    Mar 2005
    Location
    Hampshire
    Posts
    432
    Thanks
    4
    Thanked 3 Times in 3 Posts

    Default About to move a SMF to RedFox

    I'm moving a SMF over to be hosted on RedFox tonight and was wondering if anyone had a bit of PHP code that I could use to replace the index page with on the old site.

    Basically, what I'm after is when they go to

    www.domainA.me.uk/index.php?action=unread

    or version of eg ?topic=1123

    I'm after the index page to redirect them to

    www.domainA.co.uk/index.php?action=unread

    once the forum has been moved over, I will be making domainA.me.uk to be an alias of domainA.co.uk so it is a temp measure while name servers change etc.

    Cheers

    Just chill

  2. #2
    Join Date
    May 2007
    Location
    Eauze, France
    Posts
    175
    Thanks
    10
    Thanked 17 Times in 15 Posts

    Default

    Don't use PHP myself but try:

    header("Location: http://someurl.com");

    I see a note that that nothing must preceed this.

    [That I found with a search: php response redirect]

  3. #3
    Join Date
    Mar 2005
    Location
    Hampshire
    Posts
    432
    Thanks
    4
    Thanked 3 Times in 3 Posts

    Default

    it is one of those things that I could do without any problem in .Net etc. However, I do not know PHP. The main problem is that I want to keep the query arguments after the page name.

    Just chill

  4. #4
    Join Date
    May 2007
    Location
    Eauze, France
    Posts
    175
    Thanks
    10
    Thanked 17 Times in 15 Posts

    Default

    Some suggestion here : http://www.webmasterworld.com/forum88/13350.htm


    Note the piece about $_SERVER['QUERY_STRING']

  5. The Following User Says Thank You to SKILLIT For This Useful Post:

    Tanzy (29th August 2008)

  6. #5
    Join Date
    Mar 2005
    Location
    Hampshire
    Posts
    432
    Thanks
    4
    Thanked 3 Times in 3 Posts

    Default

    Cheers mate, spot on.

    Just chill

  7. #6
    Join Date
    Mar 2005
    Location
    Isle of Man
    Posts
    1,261
    Thanks
    3
    Thanked 24 Times in 24 Posts

    Default

    You could try something like this:
    PHP Code:
    if(!preg_match('/^www\.domaina\.co\.uk$/',$_SERVER['HTTP_HOST'])) {
        
    header('HTTP/1.1 301 Moved Permanently');
        if(
    $_SERVER['QUERY_STRING']){     
            
    header('Location: http://www.domaina.co.uk'.$_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING']);
        } else {
            
    header('Location: http://www.domaina.co.uk'.$_SERVER['SCRIPT_NAME']);
        }
        exit();


  8. #7
    Join Date
    Mar 2005
    Location
    Hampshire
    Posts
    432
    Thanks
    4
    Thanked 3 Times in 3 Posts

    Default

    Cheers Nick

    What does

    Code:
    $_SERVER['SCRIPT_NAME']
    do?

    Just chill

  9. #8
    Join Date
    Mar 2005
    Location
    Isle of Man
    Posts
    1,261
    Thanks
    3
    Thanked 24 Times in 24 Posts

    Default

    That will add the path of the script, in this case: /index.php. You could write it in manually.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Anyone used zedgraph on redfox?
    By Interlogic in forum ASP.NET
    Replies: 4
    Last Post: 29th November 2007, 03:39 PM
  2. phpmyadmin move DB
    By slippers in forum Technical Support
    Replies: 2
    Last Post: 9th May 2007, 04:51 PM
  3. What's next for Redfox?
    By JohnnyW in forum Sales and Service Feature Enquiries
    Replies: 7
    Last Post: 5th June 2006, 12:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •