Redirect not working
[LIST]
CENTOS 6.9
v66.0.15
I placed a redirect in cPanel:
Domain - Directory - Redirect Url - Type Match
mydomain.com mydomain.com/ariston-velis/Wesen-ECO-80-Elektrische-boiler permanent
This is my htaccess
RewriteOptions inherit
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
# 2. In your opencart directory rename htaccess.txt to .htaccess.
# For any support issues please visit: http://www.opencart.com
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
Order deny,allow
Deny from all
# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^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)
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com [NC]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301]
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/\d+\.BIN_AUTOSSL_CHECK_PL__\.\w+\.tmp$ [NC]
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/ [NC]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTP_HOST} ^mydomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^ariston\-velis\/Wesen\-Inox\-Flat\-80\-liter\-elektrische\-boiler$ "https\:\/\/mydomain\.com\/ariston\-velis\/Wesen\-ECO\-80\-Elektrische\-boiler" [R=301,L]-
If you have a root access of the server try to check the error logs at /usr/local/apache/logs/error_log 0 -
Thanks for the reply. Nothing special in the error log. It example.com/ariston-velis/Wesen-Inox-Flat-80-liter-elektrische-boiler gifs me a product not found in the shop that is OK because the product is not there anymore, but it has to direct it to example.com/ariston-velis/Wesen-ECO-80-Elektrische-boiler 0 -
Hello, It looks like you have multiple redirect rules in the .htaccess file. Can you try disabling those rules first to make sure they are not conflicting with your new redirect rule? Note the following option is available under the "Domains" tab in "WHM >> Tweak Settings" if you want remove your existing AutoSSL exclusions: Use a Global DCV Passthrough instead of .htaccess modification (requires EA4) Thank you. 0 -
Thanks Michael, Use a Global DCV Passthrough instead of .htaccess modification (requires EA4) is on. But I can't play with anymore the customer installed a module in his shop. But I will try it next time when I encounter the same problem. 0
Please sign in to leave a comment.
Comments
4 comments