Forum Moderators: phranque
I am using Joomla CMS and I want to get rid of the old Mambo phpshop files as I am going to use VirtueMart instead.
I do not want to redirect the old files to Virtuemart as I wish to start from scratch.
Basically, I would like to delete all references to com_phpshop after /index.php? and everything else after e.g
myrootsite/index.php?option=com_phpshop&Itemid=26&page=shop.browse&category_id=6
There are thousands of files out there. Looking at Awstats tells me that Google is getting a valid 200 header response from my site even though the files are not there any more. So I would like to tell Google "Look, here's a 410 Gone. No more files for you!
Does anyone know how I can do this please?
You'll need to modify the code to generate a 410-Gone response, but that's a fairly simple thing to do.
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^id=1$
RewriteRule ^index.php?option=com_phpshop\.$ [G]
This is what I have now in my.htaccess as well.
---------------------
# mod_rewrite in use
DirectoryIndex index.php
RewriteEngine On
# for apache on windows you might need to uncomment
# this Options line
#Options +SymlinksIfOwnerMatch
# Uncomment following line if your webserver's URL
# is not directly related to physival file paths.
# Update YourMamboDirectory (just / for root)
RewriteBase /
#
# Rules
#
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^(.*) index.php
--------------------------------------
Is it OK to have RewriteEngine on twice in the .htaccess file?
Thank you.
RewriteCond %{QUERY_STRING} ^option=com_phpshop
RewriteRule ^index.php$ - [G]
See "anchoring" in the regular expressions tutorial cited in our forum charter [webmasterworld.com].
Note that The Options and RewiteEngine on directive need only appear once in each .htaccess file before any other mod_rewrite directives.
Jim