Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Pligg 2.0 - .htaccess HTTPS protocol configuration

By: a guest on Jul 25th, 2013  |  syntax: None  |  size: 1.32 KB  |  views: 138  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. AddDefaultCharset UTF-8
  2.  
  3. ## 404 Error Page
  4. ## If Pligg is installed in a subfolder, change the below line to ErrorDocument 404 /name-of-subfolder/error_404.php
  5. ErrorDocument 404 /error_404.php
  6.  
  7. ## Re-directing Begin
  8. # For security reasons, Option followsymlinks cannot be overridden.
  9. #Options +FollowSymlinks -MultiViews
  10. Options +SymLinksIfOwnerMatch -MultiViews
  11. RewriteEngine on
  12. RewriteCond %{HTTP_HOST} ^www\.(.*)
  13. RewriteRule ^.*$ https://%1/$1 [R=301,L]
  14. ## If Pligg is installed in a subfolder, change the below line to RewriteBase /name-of-subfolder
  15.         RewriteBase /
  16. ## Force forward slash at the end of URL
  17.         RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
  18. ## If installed in a subfolder, you will need to add that directory after {HTTP_HOST} on the next line.
  19.         RewriteRule (.*)([^/])$ https://%{HTTP_HOST}/$1$2/ [R=301,L]
  20.  
  21. ## If installed in a subfolder you may need to add ## to the beginning of the next line
  22.         RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
  23.  
  24. ## Comment out or remove these two lines if you have a sub-domain like: http://subdomain.pligg.com or http://localhost
  25. ## Keep if your site is like: http://www.pligg.com
  26.         RewriteCond %{HTTP_HOST} !^www\.
  27.         RewriteCond %{HTTP_HOST} !^localhost
  28.         RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  29. ##### Re-directing End #####