9 Comments

  1. LawnCrack
    March 25, 2020 @ 6:14 am

    You are the man RankYa! Thank you.

    Reply

  2. Mark Purol
    March 25, 2020 @ 6:14 am

    AddType video/mp4 .mp4
    AddDefaultCharset utf-8
    <IfModule mod_mime.c>
    AddCharset utf-8 .atom
    .bbaw
    .css
    .geojson
    .js
    .json
    .jsonld
    .rdf
    .rss
    .topojson
    .vtt
    .webapp
    .xloc
    .xml
    </IfModule>

    <IfModule mod_mime.c>
    AddType application/json json map topojson
    AddType application/ld+json jsonld
    AddType application/vnd.geo+json geojson
    AddType application/xml atom rdf rss xml
    AddType application/javascript js
    AddType application/x-web-app-manifest+json webapp
    AddType text/cache-manifest appcache manifest
    AddType image/bmp bmp
    AddType image/webp webp
    AddType video/mp4 f4v f4p m4v mp4
    AddType video/ogg ogv
    AddType video/webm webm
    AddType video/x-flv flv
    AddType audio/mp4 f4a f4b m4a
    AddType audio/ogg oga ogg opus
    AddType image/svg+xml svg svgz
    AddType image/x-icon cur ico
    AddType application/font-woff woff
    AddType application/font-woff2 woff2
    AddType application/vnd.ms-fontobject eot
    AddType application/x-font-ttf ttc ttf
    AddType font/opentype otf
    AddType application/octet-stream safariextz
    AddType application/x-bb-appworld bbaw
    AddType application/x-chrome-extension crx
    AddType application/x-opera-extension oex
    AddType application/x-xpinstall xpi
    AddType text/vcard vcard vcf
    AddType text/vnd.rim.location.xloc xloc
    AddType text/vtt vtt
    AddType text/x-component htc
    </IfModule>

    # BEGIN W3TC Browser Cache
    <IfModule mod_mime.c>
    AddType text/css .css
    AddType text/x-component .htc
    AddType application/x-javascript .js
    AddType application/javascript .js2
    AddType text/javascript .js3
    AddType text/x-js .js4
    AddType video/asf .asf .asx .wax .wmv .wmx
    AddType video/avi .avi
    AddType image/bmp .bmp
    AddType application/java .class
    AddType video/divx .divx
    AddType application/msword .doc .docx
    AddType application/vnd.ms-fontobject .eot
    AddType application/x-msdownload .exe
    AddType image/gif .gif
    AddType application/x-gzip .gz .gzip
    AddType image/x-icon .ico
    AddType image/jpeg .jpg .jpeg .jpe
    AddType image/webp .webp
    AddType application/json .json
    AddType application/vnd.ms-access .mdb
    AddType audio/midi .mid .midi
    AddType video/quicktime .mov .qt
    AddType audio/mpeg .mp3 .m4a
    AddType video/mp4 .mp4 .m4v
    AddType video/mpeg .mpeg .mpg .mpe
    AddType application/vnd.ms-project .mpp
    AddType application/x-font-otf .otf
    AddType application/vnd.ms-opentype ._otf
    AddType application/vnd.oasis.opendocument.database .odb
    AddType application/vnd.oasis.opendocument.chart .odc
    AddType application/vnd.oasis.opendocument.formula .odf
    AddType application/vnd.oasis.opendocument.graphics .odg
    AddType application/vnd.oasis.opendocument.presentation .odp
    AddType application/vnd.oasis.opendocument.spreadsheet .ods
    AddType application/vnd.oasis.opendocument.text .odt
    AddType audio/ogg .ogg
    AddType application/pdf .pdf
    AddType image/png .png
    AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
    AddType audio/x-realaudio .ra .ram
    AddType image/svg+xml .svg .svgz
    AddType application/x-shockwave-flash .swf
    AddType application/x-tar .tar
    AddType image/tiff .tif .tiff
    AddType application/x-font-ttf .ttf .ttc
    AddType application/vnd.ms-opentype ._ttf
    AddType audio/wav .wav
    AddType audio/wma .wma
    AddType application/vnd.ms-write .wri
    AddType application/font-woff .woff
    AddType application/font-woff2 .woff2
    AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
    AddType application/zip .zip
    </IfModule>

    Are these conflicting? They don't take my site down..

    The cached plugins are plugins that make additions to .htaccess, correct?

    Also…

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www.URI ADDED HERE.com [NC]
    RewriteRule ^(.*)$ http://URI ADDED HERE.com/$1 [L,R=301]

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://URI ADDED HERE.com/%{HTTP_HOST}/$1 [R=301,L]
    </IfModule>

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_HOST} ^www.URI ADDED HERE.com(.+)$ [NC]
    RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
    </IfModule>

    OR

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www.URI ADDED HERE.com [NC]
    RewriteRule ^(.*)$ http://URI ADDED HERE.com/$1 [L,R=301]

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] NO URI
    </IfModule>

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC] NO URI
    RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
    </IfModule>

    Additionally these are not in the cached .htaccess, so no need to use them?
    They were added to the file and neither took my site down..?

    Thanks ahead of time..

    Reply

  3. demm9000
    March 25, 2020 @ 6:14 am

    You helped me with the "DELETE HTACCESS and wp will re-generate it". THANKS!!!! 😀

    Reply

  4. EUCO MOTIVE
    March 25, 2020 @ 6:14 am

    Thx for video

    Reply

  5. Sarang
    March 25, 2020 @ 6:14 am

    I am sorry to say but this us not working for me. I modified the .htaccess accordingly but then somehow my server resources went full. Used 100%. Then restored my default file.

    Reply

  6. hihackthis
    March 25, 2020 @ 6:14 am

    Hi RankYa, thank you! Your videos are great!
    Question: My .htaccess was modified by iThemes Security plugin. I could add some of your options (option 1 or 2 or 3) at the end of the file?
    Congrats! 😀

    Reply

  7. Slainiae
    March 25, 2020 @ 6:14 am

    Sorry for bombarding you with these two questions;
    – My WordPress eCommerce website uses HTTPS only for the checkout page – should I use the snippet of code related to HTTPS which you showed in your video if I only have one HTTPS page?
    – Being a complete dodo in this field, can you tell me please how I can check if my WordPress site is on an Apache server?
    Thank you for your help and for the fantastic video.

    Reply

  8. HE KU
    March 25, 2020 @ 6:14 am

    Nice explanation, thanks for sharing your knowledge

    Reply

  9. PurelyThemes
    March 25, 2020 @ 6:14 am

    This is some great stuff here, happy to find such a detailed explanation we can use to send to 99% of the people who need support with htaccess 🙂

    Reply

Please Login to post a comment

X

Forgot Password?

Join Us