Http redirect too many loop error

I need to redirect HTTP to HTTPS in apache .htaccess in this following code`. where to add it

RewriteEngine on

RewriteBase //
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ view1.php?cat_id=$2 [L,QSA]
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ view1.php?cat_id=$3&sub_id=$4 [L,QSA]
RewriteRule ^classifieds/view/ads/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ product.php?aid=$2 [L,QSA]
RewriteRule ^([A-Za-z0-9-]+)-id([A-Za-z0-9-]+)/?$ product.php?aid=$2 [L,QSA]
RewriteRule post-free-ads.html post_free_ads.php
RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
RewriteRule ^index.(php|html?)$ http://www.domain.com/ [R=301,L]
RewriteRule ^index2.(php|html?)$ http://www.domain.com/ [R=301,L]

`

This should help

see “Enforce Secure Server”

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.