Redirecting old .aspx files to WordPress equivalents

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.

Read More

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

Related posts

Leave a Reply

5 comments

  1. 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.

  2. 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.

  3. 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.

  4. Please Use Redirections Plugin

    Under Add new redirection, put the following:
    
    Source URL: /(.*).aspx
    Regular expression: checked ☑ OR Select "REGEX" after Source URL
    Target URL: /$1/
    
  5. 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">
    ...
    

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