luisfbmelo/artistasluso/master/.htaccess - Htaccess File

luisfbmelo/artistasluso/master/.htaccess

<ifModule mod_rewrite.c>
 RewriteEngine On

# allow social media crawlers to work by redirecting them to a server-rendered static version on the page
RewriteCond %{HTTP_USER_AGENT} (facebookexternalhit/[0-9]|Twitterbot|Pinterest|Google.*snippet|Google)
RewriteRule artists/details/(d*)$ http://www.artistaslusos.net/server/artist.php?id=$1 [P]

RewriteCond %{HTTP_USER_AGENT} (facebookexternalhit/[0-9]|Twitterbot|Pinterest|Google.*snippet|Google)
RewriteRule events/(d*)$ http://www.artistaslusos.net/server/event.php?id=$1 [P]

# Required to allow direct-linking of pages so they can be processed by Angular
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index
RewriteRule (.*) index.html [L]

</ifModule>

On Github License

Files

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

Comments

Apache