wonkjaya/sftstr/master/.htaccess - Htaccess File

wonkjaya/sftstr/master/.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
#First rewrite any request to the wrong domain to use the correct one (here www.)
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

#Now, rewrite to HTTPS:
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# images software
  RewriteRule ^.*/img/software/(.*)/(.*)/(.*)/(.*)$ /uploads/timthumb.php?src=$1.$2&cm=$3&type=sft [L]
  RewriteRule ^.*/img/software/xs/(.*)/(.*)/(.*)$ /uploads/timthumb.php?src=$1.$2&w=40 [L]
  RewriteRule ^.*/img/software/sm/(.*)/(.*)/(.*)$ /uploads/timthumb.php?src=$1.$2&w=95 [L,NC]
  RewriteRule ^.*/img/software/md/(.*)/(.*)/(.*)$ /uploads/timthumb.php?src=$1.$2&w=195 [L,NC]
  RewriteRule ^.*/img/software/lg/(.*)/(.*)/(.*)$ /uploads/timthumb.php?src=$1.$2&w=295 [L]
# no images
  RewriteRule ^.*/img/noimage/(.*)/(.*)$ /uploads/timthumb.php?src=no-image.png&cm=$1 [L]

# profile picture
  RewriteRule ^.*/img/profile/cm/(.*)/(.*)/(.*)$ /uploads/timthumb.php?src=$1&cm=$2&type=pp [L]
  RewriteRule ^.*/img/noimage/cm/(.*)$ /uploads/timthumb.php?src=no-image.png&cm=$1&type=pp [L]

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, HTTPS, REQUEST_FILENAME, REQUEST_URI

Comments

Apache