0
votes

I want to redirect my contact page to https trough .htaccess with moderewrite.

this is the url of my contact page: http://mywebsite.com/index.php?route=information/contact (this is opencart website).

Which will be the correct rewrite rule to redirect this on to https ?

2

2 Answers

1
votes

Try:

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(/index.php?route=information/contact) https://mywebsite.com$1 [L,R=301]

(OP asked how to do it with “mod_rewrite”)

1
votes

Just a simple "this for that" redirect:

Redirect 301 http://mywebsite.com/index.php?route=information/contact https://mywebsite.com/index.php?route=information/contact