I am completely dumb when it comes to .htaccess, even through my numerous attempts to learn the basics. So I am here:
This is my current .htaccess:
RewriteEngine on
RewriteRule ^$ /splash [L,R=301]
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
RewriteRule ^([a-z0-9-]+)/?$ /index.php?cat=$1 [L,NC,QSA]
I would like to keep its current functionality and add two things so its like:
- (keep) redirecting address without variable to domain.com/splash
- (keep) redirecting of address without WWW to address with WWW (http://domain.com/xx to http://www.domain.com/xx)
- (keep) make it rewrite from http://www.domain.com/aa to http://www.domain.com/index.php?cat=aa
- (add) make it rewrite from http://www.domain.com/aa/bb to http://www.domain.com/index.php?cat=aa&product=bb
- (add) remove trailing slash at the end if present