Forum Moderators: DixonJones
I don't want to use any cgi or tracking software.
Is it ok to use Apache .httaccess redirect to place links like "http://www.mysite.com/othersite.html"
and then redirecting it to the proper site?
How about using PERMANENT REDIRECT instead of the plain REDIRECT command?
Would it have a negative, positive or neutral impact on Spiders following those links?
This way I can place simple urls and then tracking them with my log file analysis software which are much more customizable than link tracking software.
Any suggestions or comments?
Thanks,
Enrique Flouret
I didn't reply to this post because I didn't received mails notifications.
I didn't try this yet, but since I have not received any negative experience I think it might be possible.
The reason for doing this is because I didn't find any decent tracking script. There must be one for sure, but it is difficult to download and check everyone of them.
Redirecting links through .httaccess is more straightforward. You simply open the .httacess file with notepad or similar and start to copy and paste the links one below the other.
Filling cgi trackers forms (in my own experience) is a long and painful work and has to be done online. Going back and forth with your browser really slows down the process.
With .httacess redirect links will look like:
www.yoursite.com/whatever (a godsend for text newsletters)
instead of
www.yoursite.com/cgi-bin/track.cgi?whatever
It should be faster to redirect urls through .httaccess than with a cgi.
Also, you can track your urls with a Server Log Analyzer and can get much more info than with cgi trackers.
The .httaccess would look like this
Redirect permanent /whateverfile [othersite.com...]
Redirect permanent /whateverfile2 [othersite.com...]
I don't think that there would be any problem with search engines, but I wanted to know if somebody had some input on that.
I will try this and then tell you what were the results.
thanks again!
AC_Design, you are making me doubt if what I did will not only hurt my rankings, but if my domain will be dropped from search engines.
It seems that won't happen, but who knows...
As far as I know if I redirect [mydomain.com...] to [othersite.com...] search engines will drop the first url and index the second one, so no harm can be done to my domain.
Googleguy, Brett? Any input on this?
Thanks
make a module Redirect.pm like this:
package Redirect;
sub handler {
my $r = shift;
$r->method('GET');
$r->headers_in->unset('Content-length');
$r->content_type('text/html');
$r->header_out('Location' => $r->path_info() );
return 302;
}
1;
Then put it somewhere where your apache perl instance can find it.
Then make a directory like "/redirect" in your webroot with a .htaccess like this:
SetHandler perl-script
PerlHandler Redirect
Then if you make a link like: [example.com...] the perl module will return a redirect to the url. Faster than a CGI, and pretty easy to maintain.
Then, to find the links people used to leave your site, you can use your standard log analysis tools.
Slick or what?
Redirect /redirect/ http://
then if you make a link like [example.com...]
the browser gets sent there and an appropriate line gets thrown in your access log.
I'm still looking for a way that you don't have to hard-code the "http://" part, probably using RedirectMatch and such, but I just don't get some stuff.
You should note that both this method and the last I outlined strip off the query strings from the URL before sending the client there, so no fair sending them to example.com?foo=bar
Also note that this method doesn't depend on the (inappropriately named) module I mentioned in the last post.
Would this do the trick for you?