okay so i am new to this htaccess thing, can you please help me out in the below, i have 1 question divided into 4,
1- cleaner urls
i am trying to have my urls look like cleaner using the below but its not working i don't know if i should add anything else,
this is how it looks now
example.com/product.php?product_id=144&product_name=50ml-bottle-with-glasses,-shirt
this is how i want them to look
example.com/product/144/50ml-bottle-with-glasses,-shirt
basically here's what i used
RewriteEngine On
RewriteRule ^product/([0-9]+)/([A-Za-z0-9-]+)/?$ product.php?product_id=$1&product_name=$2 [NC,L] # Handle product requests
2- change in url request
if my url were changed and now looks like this
example.com/product/144
can i for example just change in url lets say put 145 instead of 144 and it will reload the new page ? or should i add anything in htaccess to handle this ? i would like to know how if so.
3- hide id from url
if my url looks like this
example.com/product/144/50ml-bottle-with-glasses,-shirt
can i make it look like the below ? without the id part ?
example.com/product/50ml-bottle-with-glasses,-shirt
4- remove , from urls
can the comma be remove from the last part in the url
example.com/product/144/50ml-bottle-with-glasses,-shirt
i would like a separate answer for each alone to understand how things are working
Thank you
