www eklenmesi, https(ssl) yönlendirmesi ve index.php rewrite için aşağıdaki kodu kullanabilirsiniz. Domaini kendinize göre düzenlemeniz yeterlidir.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine on
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
#add www
RewriteCond %{HTTP_HOST} ^herkod.com$
RewriteRule ^/?$ "http\:\/\/www\.herkod\.com\/" [R=301,L]
# force HTTPS
RewriteCond %{HTTPS} =off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>