RewriteEngine On

RewriteBase /international_motors/
RewriteRule ^blog/?$ blog.php [NC,L]

RewriteRule ^admin/?$ admin/index.php [NC,L]

RewriteRule ^testimonials/?$ testimonials.php [NC,L]
RewriteRule ^careers/?$ careers.php [NC,L]
RewriteRule ^projects/?$ projects.php [NC,L]

RewriteRule ^categories/([A-Za-z0-9-]+)/?$ sub-category.php?catid=$1 [NC,L]

RewriteRule ^brands/([A-Za-z0-9-]+)/?$ brands.php?brand=$1 [NC,L]

RewriteRule ^products/([A-Za-z0-9-]+)/?$ product-details.php?product=$1 [NC,L]

RewriteRule ^furniture/([A-Za-z0-9-]+)/?$ furniture-details.php?furniture=$1 [NC,L]

RewriteRule ^services/([A-Za-z0-9-]+)/?$ services.php?service_slug=$1 [NC,L]

RewriteRule ^clients/?$ clients.php [NC,L]
RewriteRule ^faq/?$ faq.php [NC,L]
RewriteRule ^new-arrivals/?$ new-arrivals.php [NC,L]

RewriteRule ^contact-us/?$ contact-us.php [NC,L]

RewriteRule ^wholesalers/?$ wholesalers.php [NC,L]

RewriteRule ^category/([A-Za-z0-9-]+)/?$ category.php?category=$1 [NC,L]


RewriteRule ^category/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ category.php?category=$1&color=$2 [NC,L]

RewriteRule ^category/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ category.php?category=$1&size=$2&sizeval=$3 [NC,L]

RewriteRule ^packages/([A-Za-z0-9-]+)/?$ packages.php?packagetype=$1 [NC,L]

RewriteRule ^model/([A-Za-z0-9-]+)/?$ model.php?model=$1 [NC,L]

RewriteRule ^blog/([A-Za-z0-9-]+)/?$ blog-details.php?blog=$1 [NC,L]

#RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ project-details.php?category=$1&product=$2 [NC,L]

RewriteRule ^product/([A-Za-z0-9-]+)/?$ product-details.php?product=$1 [NC,L]

RewriteRule ^gallery/([A-Za-z0-9-]+)/?$ gallery-details.php?galleryid=$1 [NC,L]

RewriteRule ^gallery/?$ gallery.php [NC,L]
RewriteRule ^news/([A-Za-z0-9-]+)/?$ news-details.php?news=$1 [NC,L]
RewriteRule ^council-of-trustess/?$ council-of-trustess.php [NC,L]

RewriteRule ^([A-Za-z0-9-]+)/?$ page.php?page_slug=$1 [NC,L]

RewriteRule ^model/([A-Za-z0-9-]+)/?$ models.php?slug=$1 [NC,L]

RewriteRule ^link/([A-Za-z0-9-]+)/?$ link-details.php?link=$1 [NC,L]

RewriteRule ^excursion/([A-Za-z0-9-]+)/?$ excursion-details.php?excursion=$1 [NC,L]


RewriteRule ^products/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ details.php?product=$1&variation=$2 [NC,L]

RewriteRule ^visa-type/([A-Za-z0-9-]+)/?$ visa-type.php?visatype=$1 [NC,L]

RewriteRule ^visa-services/([A-Za-z0-9-]+)/?$ visa-details.php?visaservice=$1 [NC,L]

RewriteRule ^visa-change/([A-Za-z0-9-]+)/?$ visachange-details.php?visachange=$1 [NC,L]

RewriteRule ^hotdeals/([A-Za-z0-9-]+)/?$ deals-details.php?hotdeals=$1 [NC,L]

# Redirect specific pages to homepage
Redirect 301 /contact.html https://internationalmotors.ae/
Redirect 301 /terms-and-condition https://internationalmotors.ae/
Redirect 301 /forget-password.php https://internationalmotors.ae/
Redirect 301 /spanish/contact.html https://internationalmotors.ae/