Banisaeed
Verified User
- Joined
- Sep 23, 2015
- Messages
- 34
hello
i redirect ip to domain with method :
There is no problem, when the iptables is stop
When the iptables is start, the redirect is not executed!
i redirect ip to domain with method :
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^***\.***\.***\.***$ [NC,OR]
RewriteCond %{HTTP_HOST} ^([a-z.]+)?domain\.com [NC]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://domain.com/$1 [R=301,L]
in:
/var/www/html/.htaccess
There is no problem, when the iptables is stop
When the iptables is start, the redirect is not executed!