views:

300

answers:

5

I've converted an associates old website to Wordpress. The domain name remains the same. All the old .aspx files fall into the root of the domain folder (www.xxx.com) with no .htaccess file while the Wordpress replacement site has an .htaccess file - domain is www.xxx.com/ctpc

I have 36 old .aspx files in the root that I need to permanently redirect to the respective wordpress documents in the /ctpc subfoler.

I can do a little bit of code, html in particular and with good instructions can paste code, but writing code to get this done is obviously over my head.

I've researched this for a day and half now and am going downhill if any direction at all. I'd be grateful for any help possible.

thank you, ~Jennifer

+1  A: 

I would recommend putting a .htaccess file in the root domain, with a redirect for each of the 36 .aspx files, like this:

Redirect 301 /oldpage1.aspx http://www.newsite.com/ctpc/newpage

Put one of those on each line for each of the .aspx files. Do this in a text editor, like Notepad for Windows, save it as .htaccess, and then upload it to the root domain.

gclaghorn
Do I need any additional code in the .htaccess file?
Nope. Just this.
gclaghorn
thank you and even though you have said I do not need any other code, I noticed in most .htaccess files I've looked at as a point of reference, there is a #Begin and #End - are those necessary?
You can include those if you want, but they're not required. I've never used them.
gclaghorn
thank you very much.
A: 

One solution may be to add a META refresh tag to the header section of each of the .ASPX files that you need to redirect.

For example:

<HTML>
<HEAD>
<META http-equiv="refresh" content="5;URL=http://www.xxx.com/ctpc/new-file"&gt;
...

This tag says to refresh the page in 5 seconds by sending the user to www.xxx.com/ctpc/new-file. You can make this an immediate refresh by changing the time to 0.

Marshall
I did this and then found out that google will penalize my associates pages as spam
A: 

If you're using permalinks in Wordpress, put the 301 redirect that is listed above the Wordpress rewriting in your .htaccess file. And edit your .htaccess file yourself; if you let Wordpress automatically write to your .htaccess file, sometimes you'll end up with multiple rewrite entries that can cause problems.

songdogtech
that just went right over my head
Permalinks in Wordpress are how you get "pretty" urls, such as mysite.com/mypagename instead of mysite.com/?page=id124Those pretty permalinks are handled by the .htaccess file, so you might have to be careful how you edit the .htaccess file....
songdogtech
A: 

There's a WordPress redirection plugin that would allow you to manage all of this from within the WordPress admin section. You can create redirects for all of your 36 pages and then keep track of how many time the pages are getting referenced and which pages still have old links.

scompt.com
A: 

Hi all,

I'm trying to do the same thing and am running into issues. I need to redirect:

www.requirementsquest.com/Educate.aspx to //www.requirementsquest.com/training

I've tried this in my .htaccess but I get an "server error in application.." message. This is what I'm using:

Redirect 301 /Educate.aspx http://www.requirementsquest.com/training

Shouldn't this work?

Thanks, Jonah

Jonah