Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    324
    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
    324
    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
    324
    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
    298
    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
    785
    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
    785
    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. v153 Is a simple way to redirect the inner page links?
    By su35 in forum General Questions
    Replies: 0
    Last Post: 10 Dec 2014, 08:23 PM
  2. redirect obsolete links to a different page?
    By DML73 in forum General Questions
    Replies: 26
    Last Post: 17 Sep 2011, 03:09 PM
  3. Admin Folder Path 'Magically' Appears In Define Page Links
    By missTish! in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Apr 2011, 01:08 AM
  4. Hideous blue links in define-page content
    By olivetree in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Aug 2008, 12:17 AM
  5. Replies: 1
    Last Post: 10 Sep 2007, 10:10 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR