I have a Virtuemart 1.5.9 website.
For every product created in Virtuemart, Virtuemart creates 2 possible URLs to access that same product. Those URLs are:
URL TYPE1:
[login to view URL]
URL TYPE2:
[login to view URL]
This is bad for SEO because it creates multiple content.
In this project I need 2 rules for .htaccess that permanently redirect (301) TYPE1 URL and TYPE2 URL to this type of URL (without category_id):
[login to view URL]
For example, if I type:
[login to view URL]
[login to view URL]
[login to view URL]
All these 3 URLs should permanently redirect (301) to this URL:
[login to view URL]
I don't need to give FTP access to website, I just need the freelancer to create the 2 htaccess rules, I will then copy-paste the rules to the htaccess file.
The project ends when the 2 htaccess rules are working OK.
This is my current htaccess file content:
Options FollowSymLinks
RewriteEngine On
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a tag in URL
RewriteCond %{QUERY_STRING} (\|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ [login to view URL] [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/[login to view URL]
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) [login to view URL]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
ExpiresActive On
ExpiresDefault A600
ExpiresDefault A2419200
Header append Cache-Control "public"
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
Header unset Last-Modified