I have two sub-domains associated with my website. I had created these two subdomains to target different locations. But now I want to take down these two subdomains. Can anyone give me the full 410 gone code for .htaccess file?

I never tried it, but you might be able to do something like this:

RewriteEngine on
RewriteRule 301 old_page.html error_page.html [L,R=410]

I've always used PHP to send a 410 Gone error message. Something like <?php header("HTTP/1.0 410 Gone"); ?>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.