Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Help with An HTAccess Redirect


werty - 11:02 pm on Apr 15, 2012 (gmt 0)


I am trying to save an entire copy of a site that runs on wordpress. I do not have access to the WP login or the Database so I used software to download a copy.

Now the issue I am having is that the original WP install never had any SEO changes done, so all of the pages are basically a query string URL.

I asked a member here to help me w/ it and we had no luck. It is more complex then a normal redirect / rewrite, since it has the query string in the url.

The original URLS are mapped like this:
/?cat=3
/?cat=30
/?p=4927
/?tag=stuff
/?feed=rss2
/?feed=rss2&tag=seasonal
/?m=200904

When I took down a copy it saved them like this:
NEW:
/index-cat=3.html
/index-cat=30.html
/index-p=4927.html
/index-tag=stuff.html
/index-feed=rss2.html
/index-feed=rss2&tag=seasonal.html
/index-m=200904.html

I can change all the files to be exactly what they used to be, but as an html format w/ out an extension: either as ?cat=3 or cat=3. These do not serve properly on the server. I get a 404 on the ? version and the raw source code on the non ? version.

I can also add .html to the file so it is ?cat=3.html / cat=3.html. When I do the ? it does not show (like a 404) and the other actually works... but I cannot figure out how to do a redirect from /?cat=3 to cat=3.html

Ideally if I could just upload my new files and have a 301 redirect to say the file has moved to a new location. The second best thing would be to have to change the file names.

Either that or keep the original file names, and somehow use code to tell the server to serve these pages as html file types.

I would also like to use SSI, on these pages so I am guessing that will be the next can of worms I will need to deal with.

Thank you!


Thread source:: http://www.webmasterworld.com/apache/4441151.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com