我怎样才能使用 htaccess 重定向一个带有额外句号的 URL



我有一组网址已被网站管理员工具标记,如下所示:-

www.domain.com/blog/tag/tag-name/www.whatisthisdomaindoinghere.com/subdir/subsubdir/index.htm

我只是不知道如何将这些重定向到像 www.domain.com 这样相当简单的域。

非常感谢帮助:-)谢谢克里斯

尝试:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ [NC]
RewriteRule ^blog/([^/]+)/([^/]+)/.+ /blog/$1/$2/ [L,R=301]

最新更新