My url is changing and for example now it is ..safety-bathroom then is changing to safety-bathroom-1 and so on, to avoid daily changing rule in htaccess I would like to have a rule which will do regardless if the url is -1 or -2 or -any other incremented number
To rewrite url I tried like this:
<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^browse/home\-safety/bathroom\-safety(\-*)/$ /browse/home- safety/bathroom-safety/? [L,R=301] </IfModule>
What should I do to make it work ? Any help would be GREATLY appreciated. Current code:
<IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^browse/home-safety/bathroom-safety-(.+?)(-[0-9]+)?/$ /browse/home-safety/bathroom-safety/$1 [L,R=301] </IfModule>
:( still not redirecting ...