Welcome to WebmasterWorld Guest from 54.197.171.28

Forum Moderators: open

Message Too Old, No Replies

.htaccess redirect - Do I need a real page?

   
12:13 pm on Nov 21, 2004 (gmt 0)

10+ Year Member



Hi there guys.
I've researched a bit and want to clear things out. I want to have affiliate links on my site, but also want to hide them little. I found out that .htaccess redirect will work here great.

But I also noticed people saying that I don't have to have any real page from which I redirected users to another page.

For example:
"www.mydomain.com/afflink" redirect to "www.affiliatedomain.com/me?and_other_fluff"

So do I need to create a folder /afflink/ on my site or not?
---------------------------------
Another question.

How should I actually write the code in .htaccess

"redirect 301 www.mydomain.com/afflink www.affdom.com/)@#$?@!#$?"
or
""redirect 301 /afflink www.affdom.com/)@#$?@!#$?"

I see people add only relative url, like recent example. Is there any difference? And do I have to put 301 (permanent status) or not?
---------------------------------
Last question. Is this called cloaking and is it harmful (can SEs penalize me for that)?

thank you.

3:53 am on Nov 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No you do not to have the directory on your site.

I'm not sure if you need a 301 or a 302 but a typical mod_rewrite may look like:
RewriteRule store/details/(.*) [merchant.com?itemid=$1...] [L]

My url would look like mysite.com/details/12345/

"12345" would be the item code, sku or Asin. You then rewrite to the form that the merchant expects to see.
[merchant.com?itemid=12345...]

2:06 pm on Nov 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> Last question. Is this called cloaking and is it harmful (can SEs penalize me for that)?

It is not cloaking. Harmful? Well, those links won't be indexed and associated with your domain. The pages the links are on should be OK though.

4:56 pm on Nov 22, 2004 (gmt 0)

10+ Year Member



Thanx for helping here guys, but I'm little confused. On one tutorial I've read that a redirect should look like this: "redirect 301 /afflink www.affdom.com/)@#$?@!#$" and somewhere here on webmasterworld read that it should look like this: "RewriteRule ^(.*)$ [newdomain.com...] [R=301,L]".

So how should it actually look like. And could you explain what these chars mean (/$1 , [R=301,L]). As I've understood:
^ means beginning of URL
$ end of URL

So (.*) should be replaced with old URL or what?
and
Do I have to write absolute or relative URLs (both new and old)?