Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    216
    Plugin Contributions
    0

    Default Redirect define page links

    Hello,

    I need to do a redirect from:

    http://www.MYSTITE.com/index.php?main_page=page_3

    to

    http://www.MYSITE.com/index.php?main_page=custom_page

    I tried this in .htaccess:

    Redirect 301 /index.php?main_page=page_3 http://www.MYSITE.com/index.php?main_page=custom_page

    but no worky.

    Any suggestions ?

    Thanks

    DD

  2. #2
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    216
    Plugin Contributions
    0

    Default Re: Redirect define page links

    Does anyone have any suggestions on this ?

    Thanks

  3. #3
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    216
    Plugin Contributions
    0

    red flag Re: Redirect define page links

    Ok, so a have searched the forum and the web for an answer.

    The closest i've found was from the ZC forum which led me to this:


    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^MYSITE.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.MYSITE.com$
    RewriteRule ^index.php$ "http\:\/\/MYSITE\.com\/\/index\.php\?main_page\=page_custom_page" [R=301,L]


    However, this seems to want to redirect any page with index.php? to my custom_page; in addition, kicks back a "too many redirects"

    Please HELP.......


    DD

  4. #4
    Join Date
    Jun 2006
    Posts
    177
    Plugin Contributions
    0

    Default Re: Redirect define page links

    I'm trying to figure this one out also. I want to redirect my main_page to an index.html page instead. Seems no one else can figure it out either!

  5. #5
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    771
    Plugin Contributions
    7

    Default Re: Redirect define page links

    Quote Originally Posted by djdavedawson View Post
    Hello,

    I need to do a redirect from:

    http://www.MYSTITE.com/index.php?main_page=page_3

    to

    http://www.MYSITE.com/index.php?main_page=custom_page

    I tried this in .htaccess:

    Redirect 301 /index.php?main_page=page_3 http://www.MYSITE.com/index.php?main_page=custom_page

    but no worky.

    Any suggestions ?

    Thanks

    DD
    Modify or create /includes/languages/english/html_includes/YOUR_TEMPLETE/define_page_not_found.php file.
    PHP Code:
    <?php
    /* define_page_not_found.php
        This script is the last try to redirect the URI request to the
        correct page.
    */

        // Check URI $_SERVER['REQUEST_URI']
        
    switch (basename($_SERVER['REQUEST_URI'])){ 
          case 
    'index.php?main_page=page_3'// old page link
            
    header("HTTP/1.1 301 Moved Permanently"); // Tell them that the page has moved
            
    header("Location: index.php?main_page=custom_page"); // new page
            
    break;

       
    /*   case 'index.php?main_page=product_info&cPath=64_31&products_id=228': // old page link
            header("HTTP/1.1 301 Moved Permanently"); // Tell them that the page has moved
            header("Location: index.php?main_page=product_info&cPath=64_31&products_id=229"); // new page
            break;
      */
            
    default:
            echo 
    '<p><strong>Pleace select you page from our site map below</strong></p>';
        } 
    ?>
    Skip
    • 446F63746F722057686F •

  6. #6
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    771
    Plugin Contributions
    7

    Default Re: Redirect define page links

    Quote Originally Posted by skipwater View Post
    Modify or create /includes/languages/english/html_includes/YOUR_TEMPLETE/define_page_not_found.php file.
    PHP Code:
    <?php
    /* define_page_not_found.php
        This script is the last try to redirect the URI request to the
        correct page.
    */

        // Check URI $_SERVER['REQUEST_URI']
        
    switch (basename($_SERVER['REQUEST_URI'])){ 
          case 
    'index.php?main_page=page_3'// old page link
            
    header("HTTP/1.1 301 Moved Permanently"); // Tell them that the page has moved
            
    header("Location: index.php?main_page=custom_page"); // new page
            
    break;

       
    /*   case 'index.php?main_page=product_info&cPath=64_31&products_id=228': // old page link
            header("HTTP/1.1 301 Moved Permanently"); // Tell them that the page has moved
            header("Location: index.php?main_page=product_info&cPath=64_31&products_id=229"); // new page
            break;
      */
            
    default:
            echo 
    '<p><strong>Pleace select you page from our site map below</strong></p>';
        } 
    ?>
    Skip
    Forgot in the admin you must set Admin > MyStore > Missing Page Check to 'Page Not Found'
    • 446F63746F722057686F •

 

 

Similar Threads

  1. Redirect Products to another store without losing inbound links?
    By FluffyTheCat in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 18 Jul 2008, 11:01 PM
  2. JAM problem - redirect your affiliate links to any other URL
    By FreeArticlePublishin in forum General Questions
    Replies: 5
    Last Post: 28 Jan 2008, 05:07 PM
  3. Replies: 1
    Last Post: 10 Sep 2007, 10:10 PM
  4. duplicated 'define page 2' and define page status not appearing
    By twitchtoo in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 7 May 2007, 06:03 AM
  5. Redirect to zc_install/links linked to wrong folder...oh boy.
    By toonopoly in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 25 Jan 2007, 04:24 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
  •