# Redirect non-www to www

# Create pretty URLs
# End: Create pretty URLs

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

# Redirect all extensions to html
if ($is_args = ''){
	rewrite ^([^.]*)\.shtml$ $1.html permanent;
	rewrite ^([^.]*)\.phtml$ $1.html permanent;
	rewrite ^([^.]*)\.jhtml$ $1.html permanent;
	rewrite ^([^.]*)\.htm$ $1.html permanent;
	rewrite ^([^.]*)\.php$ $1.html permanent;
	rewrite ^([^.]*)\.aspx$ $1.html permanent;
	rewrite ^([^.]*)\.asp$ $1.html permanent;
	rewrite ^([^.]*)\.jsp$ $1.html permanent;
	rewrite ^([^.]*)\.apk$ $1.html permanent;
}
# End: Redirect all extensions to html
