Sinds kort heb ik SSL op mijn site geinstaleerd.
Graag wil ik de volgende zaken in mijn htaccess bestand regelen.
- http omleiden naar https
- http://*snip*.nl/* en https://*snip*.nl/* omleiden naar https://www.*snip*.nl
- 2x een specifieke pagina omleiden naar een andere pagina
- 10x een domein omleiden naar een ander domein
- EXPIRES CACHING optimaal maken voor Google PageSpeeds Insights
Dat werkt aardig maar heeft in bepaalde gevallen een loop. Ik krijg niet uitgevonden waardoor de loop ontstaat en hoe ik die op kan heffen.

Deze code staat nu in htaccess, ik hoop dat iemand kan helpen.
Graag wil ik de volgende zaken in mijn htaccess bestand regelen.
- http omleiden naar https
- http://*snip*.nl/* en https://*snip*.nl/* omleiden naar https://www.*snip*.nl
- 2x een specifieke pagina omleiden naar een andere pagina
- 10x een domein omleiden naar een ander domein
- EXPIRES CACHING optimaal maken voor Google PageSpeeds Insights
Dat werkt aardig maar heeft in bepaalde gevallen een loop. Ik krijg niet uitgevonden waardoor de loop ontstaat en hoe ik die op kan heffen.

Deze code staat nu in htaccess, ik hoop dat iemand kan helpen.
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.*snip*.nl/$1 [R=301,L] RewriteCond %{HTTP_HOST} ^*snip*.nl$ [NC] RewriteRule ^(.*)$ https://www.*snip*.nl/ [R=301,L] Redirect 301 /content/*snip*.html https://www.*snip*.nl/evenementen/ Redirect 301 /content/*snip*.html https://www.*snip*.nl/*snip*/ RewriteCond %{HTTP_HOST} ^*snip*.nl [NC,OR] RewriteCond %{HTTP_HOST} ^www.*snip*.nl [NC] RewriteRule ^(.*)$ https://www.*snip*.nl/$1 [L,R=301,NC] RewriteCond %{HTTP_HOST} ^*snip*.be [NC,OR] RewriteCond %{HTTP_HOST} ^www.*snip*.be [NC] RewriteRule ^(.*)$ https://www.*snip*.nl/$1 [L,R=301,NC] RewriteCond %{HTTP_HOST} ^*snip*.eu [NC,OR] RewriteCond %{HTTP_HOST} ^www.*snip*.eu [NC] RewriteRule ^(.*)$ https://www.*snip*.nl/$1 [L,R=301,NC] RewriteCond %{HTTP_HOST} ^*snip*.nl [NC,OR] RewriteCond %{HTTP_HOST} ^www.*snip*.nl [NC] RewriteRule ^(.*)$ https://www.*snip*.nl/$1 [L,R=301,NC] RewriteCond %{HTTP_HOST} ^*snip*.nl [NC,OR] RewriteCond %{HTTP_HOST} ^www.*snip*.nl [NC] RewriteRule ^(.*)$ https://www.*snip*.nl/$1 [L,R=301,NC] RewriteCond %{HTTP_HOST} ^*snip*.be [NC,OR] RewriteCond %{HTTP_HOST} ^www.*snip*.be [NC] RewriteRule ^(.*)$ https://www.*snip*.nl/$1 [L,R=301,NC] RewriteCond %{HTTP_HOST} ^*snip*.be [NC,OR] RewriteCond %{HTTP_HOST} ^www.*snip*.be [NC] RewriteRule ^(.*)$ https://www.*snip*.nl/$1 [L,R=301,NC] RewriteCond %{HTTP_HOST} ^*snip*.eu [NC,OR] RewriteCond %{HTTP_HOST} ^www.*snip*.eu [NC] RewriteRule ^(.*)$ https://www.*snip*.nl/$1 [L,R=301,NC] RewriteCond %{HTTP_HOST} ^*snip*.nl [NC,OR] RewriteCond %{HTTP_HOST} ^www.*snip*.nl [NC] RewriteRule ^(.*)$ https://www.*snip*.nl/$1 [L,R=301,NC] RewriteCond %{HTTP_HOST} ^*snip*.nl [NC,OR] RewriteCond %{HTTP_HOST} ^www.*snip*.nl [NC] RewriteRule ^(.*)$ https://www.*snip*.nl/$1 [L,R=301,NC] ## EXPIRES 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 text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" </IfModule> ## EXPIRES CACHING ##
[ Voor 9% gewijzigd door RobIII op 06-02-2015 18:39 ]