Forum Moderators: phranque
I had an old site with dynamically generated pages that is gone and it has been replaced by a WP blog. None of the old dynamically generated pages exist anymore.
I have:
http://www.sitename.com/lorum_ipsum.php?page=x
This works to get me to a specified category without the query string:
redirect 301 /lorum-ipsum.php http://www.sitename.com/category/uncategorized/?
and gives me:
http://www.sitename.com/category/uncategorized/
So far so good (I think), but how do I get it to go to the root (which I may use in some cases) without the query string? I can use the '?' at the end to eliminate the query string, but the '?' gets put in the url I see in my browser.
If I use this:
redirect 301 /lorum-ipsum.php http://www.sitename.com/?
I get:
http://www.sitename.com/?
It looks like the '?' doesn't effect the browser...it ignores the '?'.
How does a search engine see it? I need to make sure the redirect offers up the right url to both human and spider visitors.
I don't know why it doesn't show when I'm going to a folder and does if I go to the root. Is there a simple way to eliminate the '?' when going to the root? Does it matter?
What do I do with a url like this:
http://www.sitename.com/?page=8
I would like this to go to it's own area (/category/uncategorized2/...or whatever) but it currently goes to the root without any rule, I assume because the query string is ignored. How do I do this url? Can I even do it without 'rewrite'? I tried a bunch of 'rewrites' detailed here and none worked. I can not boot the server and have limited access, hence the need (I believe) to use htaccess.
Thanks!
The mod_alias Redirect and RedirectMatch directives are simple, but old and feature-limited, and can't do everything that you want to do.
Jim