Advertisement
MChaos

htaccess

Dec 6th, 2023
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. AddDefaultCharset UTF-8
  2.  
  3.  
  4. RewriteEngine On
  5. RewriteBase /
  6.  
  7. #убираем лишние слеши
  8. RewriteCond %{REQUEST_URI} ^(.*?)\/{2,}(.*?)$
  9. RewriteRule . %1/%2 [L,R=301]
  10. RewriteCond %{THE_REQUEST} //
  11. RewriteRule .* https://%{HTTP_HOST}/$0 [R=301,L]
  12.  
  13. #daca linkul nu are slash la sfarsit il adaugam
  14. RewriteCond %{REQUEST_URI} !\?
  15. RewriteCond %{REQUEST_URI} !\&
  16. RewriteCond %{REQUEST_URI} !\=
  17. RewriteCond %{REQUEST_URI} !\.
  18. RewriteCond %{REQUEST_URI} ![^\/]$
  19. RewriteRule ^(.*)\/$ /$1 [R=301,L]
  20.  
  21. RewriteCond %{HTTPS} on
  22. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  23.  
  24. RewriteCond %{HTTP_HOST} www.daac-hermes.ilab.studio
  25. RewriteRule ^ https://daac-hermes.ilab.studio%{REQUEST_URI} [R=301,L]
  26.  
  27. RewriteCond $1 !^(index\.php|images|export|static|robots\.txt|pngfix\.js|css|js|ckeditor|kcfinder|public|app|phpThumb|favicon.\ico|jscripts|upload-files|img|libs|fonts|kjs|kcss)
  28. #RewriteRule ^.*sitemap\.xml$ index.php/sitemap [L]
  29. RewriteRule ^(.*)$ /index.php?/$1 [L,QSA]
  30.  
  31.  
  32. # php -- BEGIN cPanel-generated handler, do not edit
  33. # Set the “ea-php73” package as the default “PHP” programming language.
  34. <IfModule mime_module>
  35. AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
  36. </IfModule>
  37. # php -- END cPanel-generated handler, do not edit
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement