Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 122
  • Last Modified:

Redirect using .htaccess

We have created a new WordPress site to replace the "old" site.

The old site was www.xyz.com.

The new site is www.xyz.com/new-site

We want to remove all the subpages on the old site & create a "redirect" to the new site for a 404 error.

Somewhere I found that putting a line of code in the .htaccess file, as follows, would take care of that:

ErrorDocument 404 http://www.xyz.com/new-site

To test this, I deleted a subpage from the old site, then directly typed it's address in to the browser. I still get the old page, eve though it's not there. I assume it's in my cache??

So I went to another browser, Chrome (I don't want to clear my whole cache in FireFox for other reasons).

I typed in the same direct page reference. It's still there. I cleared the cache in Chrome for the last 4 weeks, typed it in again it's still there.

That's physically impossible since the page is NOT ON the site.

What can I do?

You can try it; the real address (of the deleted page) is www.rain1.com/irrigation.htm.

Thanks

What can I do?
0
Richard Korts
Asked:
Richard Korts
  • 2
  • 2
1 Solution
 
strungCommented:
If the "real page" is Rain One Irrigations systems, then the link in your post above still points to it.  Use an FTP client to check whether irrigation.htm is still in the www folder for rain1.com.
0
 
Richard KortsAuthor Commented:
to strung

I use FileZilla for ftp. I physically deleted the page using FielZilla. It is not there; see attached.
filezilla.jpg
0
 
strungCommented:
The screen shot shows you are looking in the folder /archive. Look in the root directory or in the folder /www.
0
 
Richard KortsAuthor Commented:
oops, you're right.

I deleted it at the root & it works; redirects to the new site.

Thanks!
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now