Redirect Help

lord1027

Elite Member
Joined
Sep 20, 2013
Messages
3,218
Reaction score
2,342
Hey guys, I have a small question for you. I think it can be done in .htaccess, but I just didn't manage to find a working solution yet.
Basically, I want a domain and all it's subpages to redirect to a specific URL, pretty much like this:

Whenever someone tries to visit mydomain.com/anypage/1234 he would get redirected to http://www.somethingstatic.com/anypage/1234 (in URL encoded form).

Example:
Visitor lands on www.mydomain.com/something/else/123, he would get redirected to http://www.somethingstatic.com//something/else/123

Basically, I want mydomain.com/* to point to seconddomain.com/* (with * URL encoded this time)

Does anyone know how to do this?
 
You will need to get a redirect plugin and redirect individual pages. Doing it on .htaccess would probably slow down the loading time. Just like blocking up a huge list of ips using .htaccess
 
You will need to get a redirect plugin and redirect individual pages. Doing it on .htaccess would probably slow down the loading time. Just like blocking up a huge list of ips using .htaccess

You don't understand, I don't want it for specific pages, I want it for any URL following my domain. These pages do not actually exist, but if someone tries to visit mydomain.com/1234 he needs to get redirected to seconddomain.com/1234 (plus the URL encoded part)
 
I don't think this can be implemented with .htaccess. You will have to go through every page's html and add the redirection code. OR if you're using wordpress then you can do it with plugin Pretty Link
 
I don't think this can be implemented with .htaccess. You will have to go through every page's html and add the redirection code. OR if you're using wordpress then you can do it with plugin Pretty Link

I don't need an actual website or something, so no wordpress. I just want every visitor that comes to my domain (direct link) to "www.mydomain.com/test-link-for-example" to get redirected to "www.seconddomain.com/test-link-for-example".
 
Here you go:

Code:
RewriteEngine on 
RewriteRule ^(.*)$ http://www.mattcutts.com/$1 [R=301,L]
 
Here you go:

Code:
RewriteEngine on 
RewriteRule ^(.*)$ http://www.mattcutts.com/$1 [R=301,L]

The code works pretty well, with one exception. I'm trying to use this for affiliate purposes, so let me show you how the redirect url should look like:
Code:
http://event.affiliatetracker.com/events/click?ad_type=quicklink&aff_code=xxxxx&unique=xxxxx&redirect_to=http%253A%252F%252Fwww.test.com%252Furl-to-product
The URL after redirect_to is double encoded.
Right now, the current htaccess redirects me to
Code:
http://event.affiliatetracker.com/events/click?ad_type=quicklink&aff_code=xxxxx&unique=xxxxx&redirect_to=http53A52F52Fwww.test.com52Furl-to-product

Which is single encoded. Could anyone help me modify the htaccess so that it redirects to double encoded?
 
YouTube Channel names are shortened by a Python script which spoofs "custom' URLs from almost unbreakable code. Only redirect-checker on "try" subdomain of "seoimage" site (sorry no links allowed for me yet) can detect such things, but it still can, so you might use it for checking.

However, I don't know how to use it to check a list of URLs, e.g. from a file, as it's form data exchange is hidden - can anyone please advise a way to mass-check redirects?
 
Back
Top