I have a series of URLs like this:
https://pocketnews.it/folder/subfolder/1234-rqoiryiewoqryiuewoqyroiwqhfkjlahflkdjsa
and I need to remove a part of it that which changes slightly between different URLs, like the following:
folder/subfolder/1234-
folder3/subfolder2/32456-
folder3/subfolder3/1234-
To obtain URLs like this one:
https://pocketnews.it/rqoiryiewoqryiuewoqyroiwqhfkjlahflkdjsa
I thought about using regex in the rewrite rules like this:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^pocketnews.it/(.*)[-]$ http://pocketnews.it/$1 [R=301,L]
</IfModule>
But it doesn't work
How can I achieve what I want?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…