Skip to content

Instantly share code, notes, and snippets.

View intsdev's full-sized avatar
🏠
Working from home

Alexandr intsdev

🏠
Working from home
View GitHub Profile
@intsdev
intsdev / .htaccess
Last active May 16, 2020 13:55
Remove trailing slash (redirect to remove trailing slash) in .htaccess
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ https://%{HTTP_HOST}/$1 [R=301,L]
@intsdev
intsdev / nginx.conf
Last active July 11, 2020 18:20
Nginx config
server {
listen 80;
server_name mydomain.com;
# To remove the trailing slash on all URLs:
rewrite ^/(.*)/$ /$1 permanent;
# To remove the trailing slash on one page
# rewrite ^/page/$ /page permanent;
location / {
@intsdev
intsdev / 000-default-le-ssl.conf
Last active July 12, 2020 08:34
Apache proxy
<IfModule mod_ssl.c>
<VirtualHost *:443>
# ...
SSLEngine On
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
# ...
</VirtualHost>