RewriteCond %{THE_REQUEST} //+ [NC]
RewriteRule ^.*$ / [R=301,L]

<IfModule mod_headers.c>
    <FilesMatch "\.(html|htm|php)$">
        Header set Cache-Control "no-store, no-cache, must-revalidate"
    </FilesMatch>
    <FilesMatch "\.(css|js|jpg|jpeg|png|gif|ico|svg|webp)$">
        Header set Cache-Control "max-age=31536000, public"
    </FilesMatch>
</IfModule>
RewriteEngine on

RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR]
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR]
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR]
RewriteCond %{HTTP_USER_AGENT} uuuu7u^Navroad [OR]
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR]
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus

RewriteRule ^.* - [F,L]
<IfModule mod_headers.c>
Header set Cache-Control "max-age=0,no-store"
</IfModule>

RewriteCond %{THE_REQUEST} //+ [NC]
RewriteRule ^.*$ https://www.wpsbiz.com/Wali-Exports/ [R=301,L]
### WWW & HTTPS
# ensure www.
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# ensure https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
ErrorDocument 404 https://www.waliexports.com
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^index\.htm$ index.php
RewriteRule ^photo-gallery\.htm$ gallery.php
RewriteRule ^video-gallery\.htm$ video-gallery.php
RewriteRule ^search\.htm$ search.php
RewriteRule ^weight-calculator\.htm$ weight-calculator.php
RewriteRule ^clients\.htm$ clients.php
RewriteRule ^rug-care\.htm$ rug-care.php
RewriteRule ^the-craft\.htm$ craft.php
RewriteRule ^the-process\.htm$ process.php
RewriteRule ^customized-rugs\.htm$ custom.php
RewriteRule ^certificate\.htm$ certificate.php
RewriteRule ^diet-chart-for-diabetic-patients\.htm$ diet-chart-for-diabetic-patients.php
RewriteRule ^diet-chart-for-kidney-patients\.htm$ kidney-diet-chart.php
RewriteRule ^error\.htm$ error.php
RewriteRule ^market-area\.htm$ market.php
RewriteRule ^blogs\.htm$ blog.php
RewriteRule ^blog/([^/]*)\.htm$  blog-detail.php?blog_name=$1&caa=$1 [L]
RewriteRule ^about-us\.htm$ about.php
RewriteRule ^manufacturing\.htm$ manufacturing.php
RewriteRule ^packages\.htm$ packages.php
RewriteRule ^packages/([^/]*)\.htm$  packages-details.php [L]

RewriteRule ^faq\.htm$ faq.php
RewriteRule ^contact-us\.htm$ contact.php
RewriteRule ^privacy-policy\.htm$ privacy-policy.php
RewriteRule ^gallery\.htm$ gallery.php
RewriteRule ^testimonials\.htm$ testimonials.php
RewriteRule ^gallery-products\.htm$ gallery-products.php
RewriteRule ^sitemap\.htm$ sitemap.php
RewriteRule \.htm$ category.php
RewriteRule ^([^/]*)/$ index_sub.php?cid=$1 [L]
RewriteRule ^([^/]*)/([^/]*)\.htm$  category_sub.php?pid=$2&ca=$1 [L]

Redirect 301 /p-about-us https://www.waliexports.com/about-us.htm
Redirect 301 /p-quality https://www.waliexports.com/mens-wear.htm
Redirect 301 /categories.php https://www.waliexports.com/mens-wear.htm
Redirect 301 /p-company-profile https://www.waliexports.com/about-us.htm
Redirect 301 /p-privacy-policy https://www.waliexports.com/contact-us.htm
Redirect 301 /quote.php https://www.waliexports.com/blogs.htm
Redirect 301 /p-contact-us https://www.waliexports.com/contact-us.htm
Redirect 301 /categories.php?cid=32&title=mens-wear https://www.waliexports.com/mens-wear.htm
Redirect 301 /categories.php?cid=36&title=bags-collection https://www.waliexports.com/ladies-underwear.htm
Redirect 301 /categories.php?cid=33&title=home-textile https://www.waliexports.com/mens-polo-shirt.htm
Redirect 301 /categories.php?cid=49&title=ladies-wear https://www.waliexports.com/ladies-wear.htm
Redirect 301 /categories.php?cid=34&title=kids-wear https://www.waliexports.com/kids-wear.htm
Redirect 301 /categories.php?cid=37&title=towel-collection https://www.waliexports.com/mens-nightwear.htm
Redirect 301 /categories.php?cid=35&title=our-aprons https://www.waliexports.com/mens-puffer-jacket.htm

RewriteCond %{QUERY_STRING} ^sid=61&title=beach-towels$ [NC]
RewriteRule ^products\.php$ https://www.waliexports.com/mens-wear.htm? [R=301,L]

RewriteCond %{QUERY_STRING} ^sid=46&title=trousers$ [NC]
Redirect 301 /products.php$ https://www.waliexports.com/ladies-tops.htm

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
