Advertisement
Guest User

Pligg 2.0 - .htaccess HTTPS protocol configuration

a guest
Jul 25th, 2013
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  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 #####
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement