No announcement yet.

410 error with htaccess for all *.html pages in Joomla?

  • Filter
  • Time
  • Show
Clear All
new posts

  • KelvinSmith
    You can add the following rule in htaccess:

    RewriteEngine on

    #--exclude "/googlea1b2c3d4e5f6.html--#
    RewriteCond %{REQUEST_URI} !^/googlea1b2c3d4e5f6\.html$ [NC]
    #--redirect all .html requests to 410 Gone--#
    RewriteRule \.html$ - [R=410,L]

    Leave a comment:

  • 410 error with htaccess for all *.html pages in Joomla?

    Recently, I had a problem with my web server. Having a security hole at Joomla, somebody created thousands of files (ending in *.html) in my website.

    I have removed all these files, but Google keep querying this particular files. I have previously added a more than hundred of pages at Google Webmaster Tools being removed, however there are still lots of files.

    I just want to put a rule in the .htaccess file to return a 410 error code when any file ending with .html is requested, EXCEPT if the page is googlea1b2c3d4e5f6.html (a file from google).

    How to sort out this problem?