# invoke rewrite engine
RewriteEngine On
RewriteBase /

Options -Indexes
<IfModule mod_negotiation.c>
	Options -MultiViews
</IfModule>

# Redirect non-www to www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

# Prevent scraping from archive for free demo
RewriteCond %{HTTP_USER_AGENT} (ia_archiver) [NC]
RewriteRule . - [F,L]

# Create pretty URLs
DirectorySlash Off

RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]
# End: Create pretty URLs

# Specific redirections
RewriteRule ^index\.html$ / [L,R=301]
RewriteCond %{QUERY_STRING} ^fontsize=small$
RewriteRule ^netavard\.com/index\.php$ index_fontsize-small.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^fontsize=normal$
RewriteRule ^netavard\.com/index\.php$ index_fontsize-normal.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^fontsize=large$
RewriteRule ^netavard\.com/index\.php$ index_fontsize-large.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^width=thin$
RewriteRule ^netavard\.com/index\.php$ index_width-thin.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^width=wide$
RewriteRule ^netavard\.com/index\.php$ index_width-wide.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=62\:google&catid=36\:internet&Itemid=68$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-article-id-62-google-catid-36-internet-Itemid-68.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=61\:advertising-in-internet&catid=36\:internet&Itemid=68$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-article-id-61-advertising-in-internet-catid-36-internet-Itemid-68.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=58\:norooz&catid=1\:latest-news$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-article-id-58-norooz-catid-1-latest-news.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=57\:what-server&catid=28\:start&Itemid=44$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-article-id-57-what-server-catid-28-start-Itemid-44.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=56\:web-design&catid=35\:site-netavard&Itemid=61$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-article-id-56-web-design-catid-35-site-netavard-Itemid-61.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=48\:ejraiyat&catid=25\:the-project&Itemid=60$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-article-id-48-ejraiyat-catid-25-the-project-Itemid-60.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=45\:about-netavard&catid=25\:the-project&Itemid=56$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-article-id-45-about-netavard-catid-25-the-project-Itemid-56.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^color=pink$
RewriteRule ^netavard\.com/index\.php$ index_color-pink.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^color=cyan$
RewriteRule ^netavard\.com/index\.php$ index_color-cyan.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^color=nightblue$
RewriteRule ^netavard\.com/index\.php$ index_color-nightblue.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^color=nightgreen$
RewriteRule ^netavard\.com/index\.php$ index_color-nightgreen.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^color=green$
RewriteRule ^netavard\.com/index\.php$ index_color-green.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^color=yellow$
RewriteRule ^netavard\.com/index\.php$ index_color-yellow.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^color=orange$
RewriteRule ^netavard\.com/index\.php$ index_color-orange.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^color=beige$
RewriteRule ^netavard\.com/index\.php$ index_color-beige.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^color=brown$
RewriteRule ^netavard\.com/index\.php$ index_color-brown.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^color=gray$
RewriteRule ^netavard\.com/index\.php$ index_color-gray.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=45&Itemid=56$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-article-id-45-Itemid-56.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=56&Itemid=61$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-article-id-56-Itemid-61.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=article&id=48&Itemid=60$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-article-id-48-Itemid-60.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_datsogallery&Itemid=67$
RewriteRule ^netavard\.com/index\.php$ index_option-com_datsogallery-Itemid-67.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=section&id=6&Itemid=68$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-section-id-6-Itemid-68.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_content&view=section&id=3&Itemid=64$
RewriteRule ^netavard\.com/index\.php$ index_option-com_content-view-section-id-3-Itemid-64.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_contact&view=contact&id=2&Itemid=65$
RewriteRule ^netavard\.com/index\.php$ index_option-com_contact-view-contact-id-2-Itemid-65.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_contact&view=contact&id=1&Itemid=59$
RewriteRule ^netavard\.com/index\.php$ index_option-com_contact-view-contact-id-1-Itemid-59.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^view=article&id=44\:cms&format=pdf$
RewriteRule ^netavard\.com/index\.php$ index_view-article-id-44-cms-format-pdf.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^view=article&id=44\:cms&tmpl=component$
RewriteRule ^netavard\.com/index\.php$ index_view-article-id-44-cms-tmpl-component.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_mailto&tmpl=component&link=aHR0cDovL3d3dy5uZXRhdmFyZC5jb20vbmV0YXZhcmQuY29tL2luZGV4LnBocD92aWV3PWFydGljbGUmaWQ9NDQ6Y21z$
RewriteRule ^netavard\.com/index\.php$ index_option-com_mailto-tmpl-component-link-aHR0cDovL3d3dy5uZXRhdmFyZC5jb20vbmV0YXZhcmQuY29tL2luZGV4LnBocD92aWV3PWFydGljbGUmaWQ9NDQ6Y21z.html [L,R=301,QSD]
RewriteCond %{QUERY_STRING} ^option=com_datsogallery&Itemid=67$
RewriteRule ^avard/index\.php$ avard/index_option-com_datsogallery-Itemid-67.html [L,R=301,QSD]
RewriteRule ^netavard\.com/index\.php$ index_php.html [L,R=301,QSD]

# 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
