RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTPS}s on(s)|offs()
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [NE,L,R]

ErrorDocument 404 https://www.wpsbiz.com/winntus

RewriteRule ^index\.htm$ index.php

RewriteRule ^market-area\.htm$ market-area.php
RewriteRule ^testimonials\.htm$ testimonials.php
RewriteRule ^terms-and-conditions\.htm$ termsandconditions.php
RewriteRule ^gallery\.htm$ gallery.php
RewriteRule ^photo-gallery\.htm$ photo-gallery.php
RewriteRule ^video-gallery\.htm$ video-gallery.php
RewriteRule ^clients\.htm$ clients.php
RewriteRule ^brochure\.htm$ brochure.php
RewriteRule ^blog\.htm$ blog.php
RewriteRule ^blog/([^/]*)\.htm$  blog-details.php?blog_name=$1&caa=$1 [L]
RewriteRule ^faq\.htm$ faq.php
RewriteRule ^csr\.htm$ csr.php
RewriteRule ^employee-awards\.htm$ employee-awards.php
RewriteRule ^contact-us\.htm$ contact.php
RewriteRule ^search\.htm$ search.php
RewriteRule ^about-us\.htm$ about.php
RewriteRule ^sitemap\.htm$ sitemap.php
RewriteRule ^careers\.htm$ careers.php
RewriteRule ^careers/([^/]+)\.htm$ careers-details.php?career_id=$1 [L,QSA]
RewriteRule ^branches\.htm$ branches.php
RewriteRule ^branches/([^/]+)\.htm$ branch-details.php?branch_id=$1 [L,QSA]
RewriteRule ^career-form\.htm$ career-form.php
RewriteRule \.htm$ category.php

RewriteRule ^([^/]*)/$ index_sub.php?cid=$1 [L]
RewriteRule ^([^/]*)/([^/]*)\.htm$  category_sub.php?pid=$2&ca=$1 [L]

