문제

How can I 301 redirect any URL that starts with a number between 1 - 9999, for example

domain.com/12/something/anotherthing

domain.com/378/product/widgets

domain.com/2560

도움이 되었습니까?

해결책

RewriteCond %{REQUEST_URI} ^/([0-9]+)/?(.*)
RewriteRule (.*) http://domain.com

Should work but not tested, I could be braking some .htaccess rules here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top