Snippets Collections
.htaccess:
AuthType Basic
AuthName "Passwort notwendig"
AuthUserFile /www/htdocs/ver923487/www.axel.mobi/pdf/.htpasswd
Require valid-user


.htpasswd:
username:password
<IfModule mod_rewrite.c>
  RewriteEngine On
</IfModule>
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$
RewriteRule ^(.*)$ "https\:\/\/newdomain\.ca\/$1" [R=301,L]
#force HTTPS
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
      RewriteCond %{HTTP_HOST} ^www.olddomain.com$
      RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L]
    </IfModule>

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]
## EXPIRES HEADER CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/svg "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
</IfModule>
## EXPIRES HEADER CACHING ##
Options +Indexes
IndexOptions FancyIndexing
IndexIgnore README .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>
# Inside .htaccess

SetEnvIf Host projectname\.com$ TYPO3_CONTEXT=Production
SetEnvIf Host projectname\.test$ TYPO3_CONTEXT=Development

# or you can just force it by using

SetEnv TYPO3_CONTEXT Development
star

Sat Feb 10 2024 08:35:44 GMT+0000 (Coordinated Universal Time) https://www.html-seminar.de/kennwortschutz-htpasswd.php

#htaccess #htpasswd
star

Wed Feb 01 2023 00:57:45 GMT+0000 (Coordinated Universal Time)

#htaccess #redirect #ssl
star

Tue Sep 20 2022 13:04:20 GMT+0000 (Coordinated Universal Time)

#apache #htaccess
star

Mon Aug 29 2022 12:01:25 GMT+0000 (Coordinated Universal Time)

#wordpress #htaccess #apache2
star

Thu Jun 09 2022 10:50:24 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/13421463/htaccess-access-control-allow-origin

#htaccess
star

Mon Dec 06 2021 16:21:05 GMT+0000 (Coordinated Universal Time)

#htaccess #redirect
star

Wed Nov 24 2021 02:46:06 GMT+0000 (Coordinated Universal Time)

#htaccess #redirect
star

Wed Nov 24 2021 02:45:15 GMT+0000 (Coordinated Universal Time)

#htaccess #redirect
star

Mon Nov 22 2021 19:22:51 GMT+0000 (Coordinated Universal Time) https://kinsta.com/nl/kennisbank/voeg-expires-headers-wordpress/

#wordpress #htaccess
star

Mon Jun 07 2021 16:07:55 GMT+0000 (Coordinated Universal Time)

#htaccess #webserver #http
star

Fri May 28 2021 11:05:45 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/a/4083233

#htaccess #webserver #http
star

Fri May 28 2021 08:39:23 GMT+0000 (Coordinated Universal Time)

#typo3 #htaccess #context #development

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension