how can I get a url alias to redirect to an outside site? i.e.

www.mysite.com/goto

redirects to

www.yoursite.com

It currently doesn't seem to work on my site. Arg.

Comments

Bèr Kessels’s picture

Please give some more information.

What module do you use for the goto? What server are you using (IIS has some problems with redirecting, very often). Or do you wnat to add a simple url in your page?

*** please ignore this post. I did not read the words "url aliassing"***

[Ber | webschuur.com]

Bèr Kessels’s picture

I am not sure if this is possible at all, but you might wnat to try using the url with http:// in front of it. Drupal uses a base url. So all urls that do not start with http:// are appended to the sites base url.

[Ber | webschuur.com]

matt westgate’s picture

The path module only aliases internal Drupal URLs. You're better off using an apache redirect in your .htaccess file:

Redirect permanent /goto http://www.yoursite.com

AlanT’s picture

In the spirit of keeping the forums organized, I'm adding to this old thread since it directly relates to my question.

I also need this functionality, where I can define a clean URL on my site to point to an affiliate link on another website.

For instance, I want to be able to create links such as

http://www.mysite.com/affiliateproduct

that automatically redirects the visitor to

http://www.affiliatesite.com/affiliatetracker.php?affcode=whatever

while tracking the number of times the URL is accessed, so that I can pull a report on all URL aliases and the number of clicks they've received.

I thought I saw a module that does this, but I'm having trouble finding it again. How can this be done?

- Alan Tutt
http://www.PowerKeysPub.com

- Alan Tutt

Exceptional Personal Development for Exceptional People
http://www.PowerKeysPub.com

AlanT’s picture

I found the answer to this question, so I figured I should post the result for others to find.

It's a combination of 2 modules, actually. The first module is the Gotwo module, which will allow you to create links such as

http://www.mysite.com/go/linkcode => redirects to http://www.yoursite.com/aff.php?affcode=whatever

From there, you can use the Path module to redefine the alias of the link to get rid of the /go/ portion, so the final link looks like

http://www.mysite.com/linkcode => redirects to http://www.yoursite.com/aff.php?affcode=whatever

While it would be nice to have this all in one place, being able to do it in 2 modules is at least a plus.

For future reference to developers, the tracking stats in the Gotwo module are extremely basic and I'd like to be able to classify the reports through the taxonomy system. That way, I can get a report on how many clicks went to "Category1" type of affiliate programs versus "Category2" type of affiliate programs, and run another report on how many clicks came from ebooks versus on-site links.

- Alan Tutt
http://www.PowerKeysPub.com

- Alan Tutt

Exceptional Personal Development for Exceptional People
http://www.PowerKeysPub.com

kunstao’s picture

anyone can up the gotwo module for drupal 5.1?

peterwilsoncc’s picture

The download for 5.x seems to be missing the .info file. I made up the following file and placed it in the same directory as gotwo.module

NAME: gotwo.info

Contents (doesn't include --- lines)
---
name = GoTwo
description = Creates URL redirections

; Information added by drupal.org packaging script on 2007-01-18
version = "5.x-1.0"
project = "gotwo"

---

mwander’s picture

Were you able to get the module working for 5.x?

Mitch

mwander’s picture

Just needed to run update.php and now it's working great.

Mitch

ron_mahon’s picture

I would like to suggest that we use Google analytics to track every thing at one spot. For a busy site it will take a load off.

Regards
Ron

giorgio79’s picture

Hello,

Thanks for this idea.

We have just been discussing of implementing an outgoing affiliate link module like wordpress affiliate ninja here:

http://drupal.org/node/399436

reprogrammer’s picture

If you're using Drupal 6, try the Path redirect module, and if you're using Drupal 7, try the Redirect module.

parijke’s picture

Page manager (ctools) has the capability to use a http-response page (301 redirect)...

Works like a charm and pagemanager is needed anyway for most use cases