problem with redirect 301
Posted: Wed Dec 12, 2018 8:14 am
hi,
i try to make redirect 301 but i can't find a right setting.
it is my .htacces:
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Order deny,allow
Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteCond %{HTTP_HOST} ^(www\.)?sample.com$
RewriteCond %{HTTPS} off
RewriteRule ^ https://www.sample.com/%{REQUEST_URI} [NC,L,R]
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteRule ^it/oldcategory1/oldcategory2/product$ https://www.sample.com/it/newcategory1/ ... y2/product [L,R=301]
is it correct?
thanks a lot
i try to make redirect 301 but i can't find a right setting.
it is my .htacces:
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Order deny,allow
Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteCond %{HTTP_HOST} ^(www\.)?sample.com$
RewriteCond %{HTTPS} off
RewriteRule ^ https://www.sample.com/%{REQUEST_URI} [NC,L,R]
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteRule ^it/oldcategory1/oldcategory2/product$ https://www.sample.com/it/newcategory1/ ... y2/product [L,R=301]
is it correct?
thanks a lot