I have been trying to apply a rewrite rule to change my urls which currently look like this:
www.mysite.com/my-site/en
change to:
www.my-site.com/en or /es
but I want it to be forceful and not allow someone to deliberately type in the latter. Also
www.my-site.com/en/?page=car&category=15
change to www.my-site.com/en/car/15
(or I can just put the category name instead) I also have this:
www.my-site.com/en/?page=catalogue-item&category=204&id=563
which I want to change to: www.my-site.com/en/563
(or I can just put in the item name instead)
Here is my htaccess so far:
# RewriteOptions inherit
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^my-site.com [NC]
RewriteRule ^(.*)$ http://www.my-site.com/$1 [L,R=301,NC]
RewriteRule ^$ my-site/ [L,NS,R=301]
RewriteCond %{HTTP_HOST} ^www.my-site.com/my\-site/ [NC]
RewriteRule ^(.*)$ http://www.my-site.com/$1 [L,R=301,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ my-site/$1 [L,NS]
RewriteRule ^([^/]*)$ /en/?page=$1 [L]
RewriteRule ^([^/]*)$ /es/?page=$1 [L]
RewriteRule ^([^/]*)/([^/]*)$ /en/?page=$1&category=$2 [L]
RewriteRule ^/([^/]+)/~([^/]+)/(.*)$ my-site/$1 [L,NS]
</IfModule>
I thank you in advance and hope someone could point out my problem, thank you again.