Hi, Is there any script out there that changes a href="http://www.google.com" into http://domain.com/visit/Google ?
You can do that with htaccess, unless you have hundreds of different domains as the destinations. I think if you could explain just a bit more. Bompa
If i understand that right you want to change all a href's to "http://domain.com/visit/_SITENAME_"? Do you create these links by your own e.g. have your own php code to generade your site code? I thought of a combination of htacess and php to do this. But i'll need more information about your existing code
I use a URL shortener script to do that. I installed YOURLs since it's compatible with my WordPress blog. I don't install it in a subdirectory; instead, I installed in a subdomain so that it'll look like this: http://sub.domain.com/_SITENAME_. It also automatically configures the .htaccess so that redirects are automatic. I like YOURLS because it also has a built-in stats to track number of clicks, locations, etc, but I'm not sure whether you'd care for something this extensive.
I`m not using any CMS, so i need a stand-alone solution. I have a lot of referal links and i would like to rewrite this links into something like this: mydomain.com/visit/SITENAME.
As i can assume each referal link will have different structure, so i think there is no easy way to do that with a stand-alone solution. Examples: 1. This example is if you are using only one affiliate network. Merchant link ID could be dynamically inserted and visitor redirected to affiliate link. Now, in this example, your affiliate link number is 123 (a=123), and merchantID is 456 (m=456). .htaccess must be placed in separate directory, say "yourdomain/redirect/" , and all "files" in that directory are redirected. RewriteEngine on RewriteRule ^(.*)$ http://network.com?a=123&m=$1 [L,R=301] Code (markup): Link placed on site page is looking like "yourdomain.com/redirect/456" 2. Let's say that link to your redirection script is domain.com/cgi-bin/dir/go.cgi?ID=100 (could be php script, not important) How about better looking and shorter domain.com/sites/100 ? RewriteEngine on RewriteRule ^(.*)$ http://www.domain.com/cgi-bin/dir/go.cgi?ID=$1 [L,R=301] Code (markup): 3. Let's say that you want to hide affiliate link or simply make shorter and better looking url. redirect 301 /somename http://YourAffiliateUrl Code (markup): In above example, /somename could be anything, you don't need to make directory with that name, just keep in mind, if that directory already exist, every page in that dir will be redirected to YourAffiliateUrl. Good luck.
redirect 301 /somename http:// YourAffiliateUrl This is what i was looking for. Thank you. I will add the links manually here.