Noob needs help with 301 redirect

Ginger_Ale

Registered Member
Joined
Feb 5, 2012
Messages
66
Reaction score
37
Hi, I know there are millions of places where 301 redirects are explained, but I'm a total noob when it comes to this, I've never touched the .htaccess before and I've tried some stuff and it didn't completely work.

I have a domain with WP installed that has old backlinks to dynamic pages in a directory that no longer exists, and I want all those to redirect to the homepage, they are appearing as 404 errors in GWT.

The old links look like:
domain.net/olddirectory/?blablabla

I tried some examples of redirects I found, but the result I get is that the links go to domain.net/?blablabla
I don't really know if that is bad or not, but just in case...

In short: How do I get rid of that annoying /?blablabla ? :pound:

Thank you SO much ^^
 
Sorry about the shameless bump :tapedshut but I haven't taken care of this issue yet.

Does somebody know how I could do that? Thanks a lot!
 
You could try the '404 redirected' plugin, works really well, can auto 301 your links or you can manually overide. It can also set up a custom 404 page with potential related links.

It has the advantage of logging all 404s so you can even pick up ones that may not be showing in webmaster tools.

Cheers

D
 
This can be done, even if the page has some get variables.

Code:
<?php header("Location: new-url"); exit(0); ?>

You need to put add the exit function or php will parse any other code after the header function.

If you need help specify get variables please let me know.

Kindest Regards,
 
Back
Top