0

I have a somewhat strange problem. A client has moved their site to Wordpress. They use a service for link exchanges that has a Wordpress plugin. The issue is that the new links pages use a query string to display the correct content and I cannot figure out how to redirect the old URLs correctly.

Old URLs look like this: domain.com/link/category-name.html

The plugin makes them look like this in WP: domain.com/links/?page=category-name.html

How in the world can I get the redirect to work properly?

Here's what I have tried:

Redirect 301 /link/actors.html http://www.artisticimages.biz/links/?page=actors.html
Redirect 301 /link/actors.html http://www.artisticimages.biz/links/%3Fpage=actors.html
Redirect 301 /link/actors.html http://www.artisticimages.biz/links/\?page=actors.html

But none of those have worked. Any help is greatly appreciated!

2 Answers 2

1

I dont think its possible as the redirect only deals with the url and not the parameters. please see this question on stack overflow

3
  • OK, I got it. I'm a novice with .htaccess. Could I rewrite the URL then redirect it? So set up a rewrite rule and then set my redirects? Would that be the best (or at least better) solution?
    – dkmojo
    Oct 25, 2012 at 23:09
  • it's a long time since I did somthing like this but that should work. Oct 25, 2012 at 23:20
  • Awesome! I've never had to do anything like this before with a redirect and the plugin that the links company has creates the URLs dynamically which has caused this issue. Thank you for your input, I really appreciate it!
    – dkmojo
    Oct 25, 2012 at 23:22
2

The first format in your post works for me and looks very correct.

I put the following config in my own server (a CentOS box) and it works.

http://turco.com/link/actors.html -> http://www.artisticimages.biz/links/?page=actors.html

[/etc/httpd/conf.d 4]# cat redirect.conf
Redirect 301 /link/actors.html http://www.artisticimages.biz/links/?page=actors.html

It works great and redirects to your server with the question mark. I am using Firefox.

1
  • Thanks. But what part of your answer is the config portion? Sorry but I'm not very familiar with setting conf files. Could you elaborate as to what and where I need to place the config? My client has their site hosted with GoDaddy. Do I need to contact them? Thanks!
    – dkmojo
    Oct 27, 2012 at 14:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .