This week I share 5 more things you can do with HTAccess
Upcoming Events
- WordCamp Bristol – May 17 – 19
- WordCamp Bari – May 17-18 (italy)
- WordCamp Athens – May 18 – 19
- WordCamp Lisboa – May 18 – 19
- WordCamp Nis – May 18 – 19
- WordCamp Detroit – May 18
Segment 1: In the News
Segment 2: More HTAccess Fun
Custom mod for a custom post type “shop”
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/shop/(.+)$ /shop/ [L,R=301]
</IfModule>
Force HTTPS + no WWW
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)(.+) [OR]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(www\.)?(.+)
RewriteRule ^ https://%2%{REQUEST_URI} [R=301,L]
Default Character Set
DefaultLanguage en–US
Set Server Timezone
SetEnv TZ America/NewYork
Fun/Random
RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?domain.com.*$ [NC]
RewriteRule ^ https://the-re-directed-url-goes-here/ [R=301,L]
Segment 3: Tool of the Week
- Plugin: Site Heath Tool Manager