I answer myself. To avoid rewriting the entire path (var/www/), a slash was missing. The correct htaccess code is:
Code: Select all
RewriteCond %{REQUEST_URI} [0-9]+-
RewriteRule ^(.*)/[0-9]+-(.*)$ /$1/$2 [R=301,L]
However, now I have a new problem. When I have an article with a title beginig with a number, for example: "10 recommended TV models", thats code also remove number "10" and url is broken.
Is there any way to differentiate the ID added by the system from the title number of an article? I understand that this may not be possible.
For small webs, I suppose that it could be solved easily making the redirections one by one, but for webs with more than 500 articles, this does not seem feasible. is it true?