.htaccess重定向匹配301模式
我想在.htaccess中重定向三种模式 (第三名是:) 他们都需要在域后添加/blog/: 我第一次使用了下面的代码,一旦它工作了,然后发生了一些事情,htaccess被删除了。现在我再次使用它,它不会重定向:.htaccess重定向匹配301模式,.htaccess,redirect,mod-rewrite,.htaccess,Redirect,Mod Rewrite,我想在.htaccess中重定向三种模式 (第三名是:) 他们都需要在域后添加/blog/: 我第一次使用了下面的代码,一旦它工作了,然后发生了一些事情,htaccess被删除了。现在我再次使用它,它不会重定向: RewriteEngine on Options +FollowSymLinks RedirectMatch 301 https://example.com/questions/(.*) https://example.com/blog/questions/$1 有人能帮
RewriteEngine on
Options +FollowSymLinks
RedirectMatch 301 https://example.com/questions/(.*) https://example.com/blog/questions/$1
有人能帮我做这些重定向吗?特别是3号,有4位数的图案 使用像这样的
重写规则
指令将所有3条规则目标化为一个模式:
Options +FollowSymLinks
RewriteEngine on
RewriteRUle ^/?(questions|category|\d{4})/.+$ /blog/$0 [L,NC,R=301,NE]
你是救世主。非常感谢你。