I am struggling with .htaccess, I have this code:
<pre>
# PRODUCTS
RewriteRule ^(.*)/(.*)$ /newwebsite/product.php?category=$1&product=$2 [L,NC]
# SERVICES
RewriteRule ^(.*)/(.*)$ /newwebsite/service.php?category=$1&service=$2 [L,NC]
# PLAIN PAGES
RewriteRule ^/$ /newwebsite/index.php [L,NC]
RewriteRule ^signup-free$ /newwebsite/signup-free.php [L,NC]
RewriteRule ^about$ /newwebsite/content.php?page=1 [L,NC]
RewriteRule ^portfolio$ /newwebsite/portfolio.php [L,NC]
RewriteRule ^our-stores$ /newwebsite/our-stores.php [L,NC]
RewriteRule ^contact$ /newwebsite/contact.php [L,NC]
RewriteRule ^products-list$ /newwebsite/lists.php?action=products [L,NC]
RewriteRule ^services-list$ /newwebsite/lists.php?action=services [L,NC]
</pre>
My code is not working properly, I need to add something to Products and Services rules to make them redirect to 'product.php' and 'service.php' respectively, without adding no more 'slash' or 'subfolder', but I don't know what and how, I mean I just need that:
http://www.root.com/maintenance-services/weekly-pool-service
redirects to =>
http://www.root.com/service.php?category=maintenance-services&service=weekly-pool-service
but at the same time I need that:
http://www.root.com/hot-tubs/jacuzzi
redirects to =>
http://www.root.com/product.php?category=hot-tubs&product=jacuzzi
How can I make a difference between PRODUCTS and SERVICES, how can I tell apache to go to different pages with the same parameters?
I am confused. Thank you very much.