########################################
# GZIP / DEFLATE COMPRESSION
########################################
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/json
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject

  # Fix for old browsers
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>

########################################
# CACHE CONTROL / EXPIRES HEADERS
########################################
<IfModule mod_expires.c>
  ExpiresActive On

  # HTML
  ExpiresByType text/html "access plus 2 days"

  # CSS & JS
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"

  # Images
  ExpiresByType image/jpg "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/gif "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 month"
  ExpiresByType image/x-icon "access plus 1 year"

  # Fonts
  ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
  ExpiresByType font/ttf "access plus 1 year"
  ExpiresByType font/otf "access plus 1 year"
  ExpiresByType font/opentype "access plus 1 year"

  # Media
  ExpiresByType video/mp4 "access plus 1 month"
  ExpiresByType video/webm "access plus 1 month"
  ExpiresByType video/ogg "access plus 1 month"
  ExpiresByType audio/ogg "access plus 1 month"

  # Feeds
  ExpiresByType application/rss+xml "access plus 1 hour"
  ExpiresByType application/atom+xml "access plus 1 hour"

  ExpiresDefault "access plus 2 days"
</IfModule>

########################################
# VARY HEADER FOR COMPRESSION
########################################
<IfModule mod_headers.c>
  <FilesMatch "\.(js|css|html|xml)$">
    Header append Vary "Accept-Encoding"
  </FilesMatch>
</IfModule>

########################################
# DISABLE ETAG & SET FAR-FUTURE EXPIRES
########################################
<FilesMatch "\.(ico|pdf|jpg|jpeg|png|gif|js|css|swf)$">
  Header unset ETag
  FileETag None
  Header set Cache-Control "public, max-age=31536000"
</FilesMatch>






RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(/[^\s]*)\s [NC]
RewriteRule . / [L,R=301]
#download prevention code
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

RewriteEngine on
### 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.selold.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$ photo-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 ^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 ^blog\.htm$ blogs.php
RewriteRule ^blog/([^/]*)\.htm$  blog-details.php?blog_name=$1&caa=$1 [L]
RewriteRule ^about-us\.htm$ abouts.php
RewriteRule ^device-evaluation\.htm$ device-evaluation.php
RewriteRule ^packages\.htm$ packages.php
RewriteRule ^packages/([^/]*)\.htm$  packages-details.php [L]
RewriteRule ^register\.htm$ register.php
RewriteRule ^login\.htm$ login.php
RewriteRule ^my-account\.htm$ my_account.php
RewriteRule ^logout\.htm$ logout.php
RewriteRule ^cart\.htm$ cart.php
RewriteRule ^checkout\.htm$ checkout.php
RewriteRule ^confirm-address\.htm$ confirm_address.php
RewriteRule ^delivery-info\.htm$ delivery_info.php
RewriteRule ^payment\.htm$ payment.php
RewriteRule ^payment-success\.htm$ payment-success.php
RewriteRule ^forget-password\.htm$ forget_passwords.php
RewriteRule ^faq\.htm$ faq.php
RewriteRule ^sell/([^/]*)\.htm$  device-evaluation.php?id=$1 [L]
RewriteRule ^final-price/([^/]*)\.htm$  final-price.php?id=$1 [L]
RewriteRule ^contact-us\.htm$ contacts.php
RewriteRule ^privacy-policy\.htm$ privacy-policy.php
RewriteRule ^terms-conditions\.htm$ terms-conditions.php
RewriteRule ^shipping-policy\.htm$ shipping-policy.php
RewriteRule ^cancellation-refund-policy\.htm$ cancellation-refund-policy.php
RewriteRule ^thank-you\.htm$ thanks.php
RewriteRule ^my-orders\.htm$ my_orders.php
RewriteRule ^edit-user-profile\.htm$ edit_user_profile.php
RewriteRule ^my-wishlist\.htm$ my_wishlist.php
RewriteRule ^change-password\.htm$ change_password.php
RewriteRule ^payment-failed\.htm$ payment-failed.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 /about.php https://selold.com/about-us.htm 
Redirect 301 /Terms_and_Conditions.php https://selold.com/
Redirect 301 /Cookie_Policy.php https://selold.com/
Redirect 301 /blog.php https://selold.com/blog.htm
Redirect 301 /faqs.php https://selold.com/
Redirect 301 /client.php https://selold.com/
Redirect 301 /form.php https://selold.com/
Redirect 301 /service.php https://selold.com/
Redirect 301 /contact.php https://www.selold.com/contact-us.htm
Redirect 301 /FullPost.php?id=17 https://selold.com/blog.htm
Redirect 301 /FullPost.php?id=18 https://selold.com/blog.htm
Redirect 301 /FullPost.php?id=8 https://selold.com
Redirect 301 /blog.php?category=Laptops https://selold.com/blog.htm
Redirect 301 /FullPost.php?id=2 https://selold.com
Redirect 301 /blog.php?category=Sell%20laptop https://selold.com/blog.htm
Redirect 301 /blog.php?category=Blog https://selold.com/blog.htm
Redirect 301 /Privacy_Policy.php https://www.selold.com/
# Redirect 301 /FullPost.php?id=2 https://www.selold.com/

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php7_module>
   php_flag display_errors Off
   php_value max_execution_time 60
   php_value max_input_time 80
   php_value max_input_vars 1000
   php_value memory_limit 1024M
   php_value post_max_size 32M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
   php_value upload_max_filesize 20M
   php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
   php_flag display_errors Off
   php_value max_execution_time 60
   php_value max_input_time 80
   php_value max_input_vars 1000
   php_value memory_limit 1024M
   php_value post_max_size 32M
   php_value session.gc_maxlifetime 1440
   php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
   php_value upload_max_filesize 20M
   php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit

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