Results 1 to 10 of 36

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: What's The Easiest Way To Create A Direct Link In The Sidebox?

    Quote Originally Posted by DK_Scully View Post
    This is on a shared server with many other websites.
    Most are. :)
    Quote Originally Posted by DK_Scully View Post
    I put it in the root folder for that site.
    Correct (I thought I detailed that earlier?)

    Quote Originally Posted by DK_Scully View Post
    I even tried changing the path so it says /zencart/index.php?main_page=index&cPath=343 http://www.book-oasis.com since the zencart program is in a folder. Nothing works.
    This may or may not be right, it really depends of the perspective of the server, and more specifically, the defined document root.

    I would suggest that you be smart here, and use the tools available to you. Assuming you have cPanel, and also assuming you know what you want to redirect, and where you wish to redirect, log into the cPanel, find the Redirect tool, then just enter the data. Heck, don't even try typing it. First go the the page you want redirected - copy its URL Now got to where you want to end up. Copy its URL. Now just paste that into the relevant fields and save.

    The only difference between this method and the .htaccess method is none. It is the same method. It just that using the cPanel tool ensures that you are editing the *right* .htaccess file, and also prevents you from making other syntax errors that can occur with manual edits.

    Cheers
    RodG

  2. #2
    Join Date
    Jan 2011
    Posts
    339
    Plugin Contributions
    0

    Default Re: What's The Easiest Way To Create A Direct Link In The Sidebox?

    That didn't work, either. I selected the proper website name, and added zencart/index.php?main_page=index&cPath=343 in the second field. It created a redirect, but it didn't take the full url. Instead, it cut it off at www.carnal-pleasures.com/zencart/index.php and won't take the remainder. So of course it won't refresh anything. Any other suggestions? Thanks!

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: What's The Easiest Way To Create A Direct Link In The Sidebox?

    Quote Originally Posted by DK_Scully View Post
    That didn't work, either. I selected the proper website name, and added zencart/index.php?main_page=index&cPath=343 in the second field. It created a redirect, but it didn't take the full url. Instead, it cut it off at www.carnal-pleasures.com/zencart/index.php and won't take the remainder. So of course it won't refresh anything. Any other suggestions? Thanks!
    Hmm, can't say I've ever had a problem with truncation.

    So, next suggestion (since you apparently need to edit the .htaccess directly) go to Google, search for "redirect .htaccess generator" - You'll find many sites where you can enter the source/destination URL's and they will generate the needed code. You then only need to cut n paste that into your own .htaccess file.

    I honestly can't remember the last time I've ever actually *typed* code into an .htaccess file - It is *so* easy to make a mistake, and things really need to be 'perfect' in order to work. This is why I use one of the code generators. :) (no, I don't have a preference which one I use)

    Cheers
    RodG

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: What's The Easiest Way To Create A Direct Link In The Sidebox?

    Quote Originally Posted by DK_Scully View Post
    and added zencart/index.php?main_page=index&cPath=343 in the second field.
    Question. Was this what you typed in because you think it is what is needed, or did you copy this from the page that you are wanting to redirect?

    Quote Originally Posted by DK_Scully View Post
    I assume that this is where you wish to redirect *to*? Until now you've been telling us that you wish to redirect to http://www.book-oasis.com so forgive me if I'm a little confused here. I'm not 100% sure, but it is possible that cPanel isn't allowing the destination to contain parameters because this could conflict with its 'Wild Card Redirect' (IOW, in your case, the cPanel is preventing you from achieving your aim). cPanel is only really good for simple cases - I suppose you could say that this is the reason the code generators exist - they go a step or three beyond what cPanel can do.

    Cheers
    RodG

  5. #5
    Join Date
    Jan 2011
    Posts
    339
    Plugin Contributions
    0

    Default Re: What's The Easiest Way To Create A Direct Link In The Sidebox?

    Rod:

    I'm trying to get http://www.carnal-pleasures.com/zenc...ndex&cPath=343 to redirect to http://www.book-oasis.com. And I copied it directly from the page. The redirect box cut it off at http://www.carnal-pleasures.com/zencart/index.php instead of taking the complete url.

  6. #6
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: What's The Easiest Way To Create A Direct Link In The Sidebox?

    Quote Originally Posted by DK_Scully View Post
    Rod:

    I'm trying to get http://www.carnal-pleasures.com/zenc...ndex&cPath=343 to redirect to http://www.book-oasis.com. And I copied it directly from the page. The redirect box cut it off at http://www.carnal-pleasures.com/zencart/index.php instead of taking the complete url.
    Code:
     
    RewriteEngine On
    RewriteCond %{HTTP_HOST}  ^www\.carnal-pleasures\.com$ [NC]
    RewriteCond %{QUERY_STRING}  ^main_page=index&cPath=343$ [NC]
    RewriteRule ^zencart/index\.php$ http://www.book-oasis.com/? [R=301,NE,NC,L]
    Cheers
    RodG

  7. #7
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: What's The Easiest Way To Create A Direct Link In The Sidebox?

    Quote Originally Posted by DK_Scully View Post
    Rod:

    I'm trying to get http://www.carnal-pleasures.com/zenc...ndex&cPath=343 to redirect to http://www.book-oasis.com. And I copied it directly from the page. The redirect box cut it off at http://www.carnal-pleasures.com/zencart/index.php instead of taking the complete url.
    This *should* also work.
    Code:
    Redirect 302 /zencart/index.php?main_page=index&cPath=343 http://www.book-oasis.com

  8. #8
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: What's The Easiest Way To Create A Direct Link In The Sidebox?

    Quote Originally Posted by DK_Scully View Post
    Add the following at the top of the .htaccess file for carnal-pleasures.com, removing any duplication further down in the file.

    Code:
    #############################
    ##  General Settings
    
    # Some basic protection provided by Apache
    Options +SymLinksIfOwnerMatch -FollowSymlinks -Indexes
    
    # Define the default Character Set for Browsers
    AddDefaultCharset utf-8
    
    RewriteEngine ON
    
    
    #############################
    ##  Rewrites
    
    RewriteCond %{QUERY_STRING} cPath=343
    RewriteRule .? http://www.book-oasis.com/ [R=301,QSD,L]
    Note that any URL having cPath=343 within it will be redirected.

 

 

Similar Threads

  1. The Quickest and Easiest way to work out what does what on the CSS style sheet
    By janissaire in forum Templates, Stylesheets, Page Layout
    Replies: 47
    Last Post: 5 Jul 2012, 03:05 AM
  2. What's the easiest way to add custom fields to the New Product page?
    By christopherw in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 18 Sep 2007, 06:16 PM
  3. What is the easiest way to add an extra sidebox and make some html pages in it?
    By hankliu in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 Dec 2006, 10:48 AM
  4. Whats the easiest way to create a newsletter??
    By Diva in forum General Questions
    Replies: 5
    Last Post: 27 Jul 2006, 09:08 AM
  5. Shipping, what is the easiest way
    By jcoit1 in forum Managing Customers and Orders
    Replies: 1
    Last Post: 11 Jul 2006, 01:49 AM

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