logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: htaccess - using 410 error code
Author
lochcolin



Joined: 13 Oct 2015
Posts: 1
Location: Vancouver, BC

PostPosted: Tue 20 Oct '15 0:29    Post subject: htaccess - using 410 error code Reply with quote

I hope this is the correct place to post this.

I'm using wordpress and have the following setup:
Main site:
public_html/wordpress/
Second site:
public_html/wordpress/second

There are two domains. One which points to the first site (lets call this www.first.com) and likewise with the second.

The second site can be accessed using either:
http://www.first.com/second
or
http://www.second.com

I've basically moved the second site to a new location which I don't want/need google to know and am using the 410 (Gone) error code to do so. I edited the .htaccess code inside of public_html/wordpress/second to reflect a 410 and this works mostly perfectly.

When you try to access http://www.second.com it returns a 410 error code and says the site has been removed. However, when you access the site using http://www.first.com/second this returns a 404 error code to first.com

Does anyone know what the correct way to set this up? I can provide the respective htaccess codes if that helps.

Hope this is clear and thanks for any help that anyone can provide.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sat 24 Oct '15 13:28    Post subject: Reply with quote

You should do that with a rewrite rule and define a condition rule that the 410 is only for that path or domain.
Back to top


Reply to topic   Topic: htaccess - using 410 error code View previous topic :: View next topic
Post new topic   Forum Index -> Apache