File: /home/qualitydent.co.uk/public_html/.htaccess_live
# invoke rewrite engine
RewriteEngine On
RewriteBase /
Options -Indexes
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
# Specific redirections
RewriteRule ^index\.html$ / [L,R=301]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^$ gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^p=185$
RewriteRule ^$ p-185 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^p=4$
RewriteRule ^$ p-4 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^p=70$
RewriteRule ^$ p-70 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^blog/2011/07/crown-me-or-not$ blog/2011/07/crown-me-or-not/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^blog/2011/08/wordless-wednesday-brushing-teeth-is-important-for-toddlers-too$ blog/2011/08/wordless-wednesday-brushing-teeth-is-important-for-toddlers-too/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^blog/2011/09/when-the-apple-bites-back$ blog/2011/09/when-the-apple-bites-back/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^composite-veneers\.html$ composite-veneers_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^cosmetic-dentistry\.html$ cosmetic-dentistry_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^dental-bonding\.html$ dental-bonding_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^dental-bridge\.html$ dental-bridge_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^dental-crown\.html$ dental-crown_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^dental-treatment\.html$ dental-treatment_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^dental-veneers\.html$ dental-veneers_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^lumineer\.html$ lumineer_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^porcelain-veneers\.html$ porcelain-veneers_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^root-canal-treatment\.html$ root-canal-treatment_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^ses\%3D$
RewriteRule ^search/fb\.php$ search/fb_ses [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^l\%3DNQlBRFMJMDFhNmNiMDNiYzQyZWE0ZWFhN2I4YzNhZGI0MTQwMGIJMAkwCTEzCQkzMQkJCTAJCQkyMjMxNTcxMDkJYwkxNjQ3MjExMjUJCXF1YWxpdHlkZW50CTIwMDYJMQk1CTU5CTE0NTkzMDczMDMJMAlOCTAJMAkwCQkwCQkJCQkJcXVhbGl0eWRlbnQuY28udWs1NmZiNDMyN2EwMjlkNi42NzAxODA0MQkwCTAJCTEJMTU3OAkxMjQ3CTIwOTY1MjkxNwkJMjA3LjI0MS4yMzcuMjIy$
RewriteRule ^search/portal\.php$ files/MjA3LjI0MS4yMzcuMjIy_23i2dwvafisdm0hjoqufd5 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^l\%3DNQlBRFMJOWJjMGE2NzQ1YTZmYzY5NTUxNGUyMjMwMWU1NThiMDcJMAkwCTEzCQkzMQkJCTAJCQkyMjMxNTcxMDkJYwkxNjQ3MjExMjUJCXF1YWxpdHlkZW50CTIwMDcJMQk1CTU5CTE0NTc3MjA1MTkJMAlOCTAJMAkwCQkwCQkJCQkJcXVhbGl0eWRlbnQuY28udWs1NmUzMGNjNzI5OWUyOC40NTc3NDQzNQkwCTAJCTEJMTU4MAkxMjQ3CTIwOTY1MjkxNwkJMjA3LjI0MS4yMzcuMjI2$
RewriteRule ^search/portal\.php$ files/MjA3LjI0MS4yMzcuMjI2_ygr4rem7jnsgm3h0xqw25x [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^l\%3DNQlBRFMJYTE2MWVhMTQ3N2E0NGMzNzY1YWI2NTQ5ODFhODhmYzgJMAkwCTEzCQkzMQkJCTAJCQkyMjMxNTcxMDkJYwkxNjQ3MjExMjUJCXF1YWxpdHlkZW50CTIwMDYJMQk1CTU5CTE0NTkyMTU5NDkJMAlOCTAJMAkwCQkwCQkJCQkJcXVhbGl0eWRlbnQuY28udWs1NmY5ZGU0ZDk1ODNmMS42NDQ5NDQxOAkwCTAJCTEJMTU3OAkxMjQ3CTIwOTY1MjkxNwkJMjA3LjI0MS4yMjkuMTUw$
RewriteRule ^search/portal\.php$ files/MjA3LjI0MS4yMjkuMTUw_s8uhfx3pkmqp3vq4nk8pmn [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^sensitive-teeth\.html$ sensitive-teeth_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^teeth-straightening\.html$ teeth-straightening_html/gtnjs-1 [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^gtnjs=1$
RewriteRule ^wisdom-teeth\.html$ wisdom-teeth_html/gtnjs-1 [L,R=301,QSD]
# Create pretty URLs
DirectorySlash Off
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ %1 [NC,L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} (.*)/$
RewriteRule ^(.*)/$ $1 [NC,L,R=301]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]
# End: Create pretty URLs
# Redirect all extensions to html
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.shtml$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.phtml$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.jhtml$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.htm$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.php$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.aspx$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.asp$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.jsp$ $1.html [L,NC,R=301]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.apk$ $1.html [L,NC,R=301]
# End: Redirect all extensions to html