jabey/jb-photo/master/.htaccess - Htaccess File

jabey/jb-photo/master/.htaccess

<IfModule mod_rewrite.c>
  RewriteEngine On

# RewriteCond %{HTTP_USER_AGENT}

#  RewriteCond %{HTTP_USER_AGENT}  ^facebookexternalhit
#  RewriteCond %{REQUEST_FILENAME} !-d
#  RewriteCond %{REQUEST_FILENAME}.php -f
#  RewriteRule ^(.*)$ $1.php [L]

#   RewriteCond %{HTTP_USER_AGENT}  !^facebookexternalhit
#   RewriteCond %{REQUEST_URI} ^/photo_simple
#   RewriteCond %{QUERY_STRING} ^id=(.*)$
#   RewriteRule ^(.*)$ id/%1?

  RewriteCond %{HTTP_USER_AGENT}  (^facebookexternalhit|google.com/+/web/snippet/)$|google.com/webmasters/tools/richsnippets)$)
  RewriteCond %{REQUEST_URI} ^/id/(.*)
  RewriteRule ^(.*)$ id.php?id=%1?

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^([/w]+)/?$ index.html [L]
</IfModule>

On Github License

Files

Download PDF of Htaccess file
HTTP_USER_AGENT, QUERY_STRING, REQUEST_FILENAME, REQUEST_URI

Comments

Apache