Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Redirect Category To Affiliate Link (Including DSEFU)

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 11-17-2007, 12:33 PM
 
donmck donmck is offline
 

Senior Member
  
Join Date: Dec 2005
Location: Australia
Posts: 137
 

Default Redirect Category To Affiliate Link (Including DSEFU)

Hi All,

I did a search in the archives, but I couldn't find what I really wanted, so I did a bit of reading on redirects using the .htaccess file, and found what I needed.

No reason why it can't be done on individual products, as opposed to a category, but this would need a product entry, thumb nail picture, price, etc., and other buy now problems.
(Which I disabled anyway).

I wanted to redirect a product, well actually, a category, to a static html page, that contains the info and links to an out-going affiliate.

It was easy to organize the product to a category entry, so I feel this is the best approach, just redirect from a category.

I am also using DSEFU, so I had to have a bit of a play around with the .htaccess file to get them to work correctly.

Here is the first part of my .htaccess file:

Code:
DirectoryIndex home.php index.php index.html Redirect 301 /Pocket-PC-Software-p-1-c-404.html http://www.dontronics-shop.com/Affiliate-Products-Virtins-sp-32.html Redirect 301 /Alex-Gibsons-Electronics-Book-Recommendations-p-1-c-408.html http://www.dontronics-shop.com/Affiliate-Products-Alex-Gibsons-Electronics-Book-Recommendations-sp-40.html Redirect 301 /Recommended-Electronic-Microcontroller-Books-p-1-c-409.html http://www.dontronics-shop.com/Affiliate-Products-Recommended-Electronic-amp-Microcontroller-Books-sp-36.html # This also works # Redirect 301 /Pocket-PC-Software-p-1-c-404.html http://www.dontronics-shop.com/pages.php?pageid=32

Placing pre-DSEFU URL's on both sides of the redirect doesn't work, however it will for any non-DSEFU site.

The real secret of getting this to work, was to make sure that the left hand side, or old URL, doesn't contain the domain. Only took me about 2 hours to find that out.

To see it in action:
http://www.dontronics-shop.com
Palm/Pocket Software >> Pocket PCSoftware
This redirects to a static html page.

As you can see from the .htaccess file, I have 3 redirects you can play around with.

DSEFU is from safetynetweb.com, (Thanks Emerson for putting me onto this one), and the vertical flyout menu from xcartmods.co.uk
I am somewhere between old age and death, can I say both mods rock, or am I too old to make comments like that?

Hope this helps someone out there in x-cart land.

Cheers Don...
__________________
Don McKenzie

http://www.dontronics-shop.com/
X-Cart 4.0.17 [Unix]

█ Hosting by www.totalserversolutions.com The very best home for your X-Cart. (was ewdhosting.com)
Reply With Quote
  #2  
Old 12-10-2007, 06:33 AM
 
Funinc Funinc is offline
 

Senior Member
  
Join Date: Sep 2002
Location: CA
Posts: 108
 

Default Re: Redirect Category To Affiliate Link (Including DSEFU)

I have the following in my .htacess file and it is not working:

Redirect 301 /home.php?cat=101 http://jodyforster.com/pages.php?pageid=4

Any Suggestions?
Reply With Quote
  #3  
Old 12-10-2007, 11:14 AM
 
donmck donmck is offline
 

Senior Member
  
Join Date: Dec 2005
Location: Australia
Posts: 137
 

Default Re: Redirect Category To Affiliate Link (Including DSEFU)

Quote:
Originally Posted by Funinc
I have the following in my .htacess file and it is not working:

Redirect 301 /home.php?cat=101 http://jodyforster.com/pages.php?pageid=4

Any Suggestions?

I would need to re-read .htaccess by finding it with google again, but did you try:
Redirect 301 http://jodyforster.com/home.php?cat=101 http://jodyforster.com/pages.php?pageid=4

Cheers Don...
__________________
Don McKenzie

http://www.dontronics-shop.com/
X-Cart 4.0.17 [Unix]

█ Hosting by www.totalserversolutions.com The very best home for your X-Cart. (was ewdhosting.com)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:09 PM.

   

 
X-Cart forums © 2001-2020