重定向。
以下ws呼叫 应将重定向到播客寄养podigee
.htaccess
RewriteEngine On
RewriteCond %{SERVER_PORT} !=443
RewriteRule ^(.*)$ https://www.training-deluxe.de/$1 [R=301,L]
RewriteCond %{SERVER_PORT} !^443$
#Whats wrong with the next line
RewriteRule /nlpdocs/podcast/feed/ https://coachingundwissenschaft.podigee.io/feed/mp3 [R=301,L]
RewriteRule /coaching_ausbildung/gesundheitscoach_somatic_release_achtsamkeit.html https://rubin-institut.de/health-practitioner-und-gesundheitscoach/ [L,R=301]
RewriteRule ^(nlpdocs/.*)$ https://www.rubin-institut.de/$1 [R=301,L]
RewriteRule ^(.*)$ https://rubin-institut.de/$1 [L,R=301]
重定向转到鲁宾·伊斯蒂特/nlpdocs/podcast ...
我无法获得线索
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有几个问题...
您需要删除上面的第二/最后一个
rewriteCond
指令,因为这将破坏以下规则。RewriteCond
指令是条件,适用于以下的第一个重写
指令。重写
指令的第一个参数采用正则表达式(REGEX),如您在以后的规则中使用的那样。这不是一个简单的URL路径。而且,重要的是,在.htaccess
Rewriterule
staters 匹配的URL路径不是从斜线开始。 (您已经在后面的规则中省略了斜线前缀,该规则实际上是“工作”的。)应该是这样的:
您需要在测试之前清除浏览器缓存,因为错误的301(永久)重定向将由该浏览器进行缓存。浏览器。首先使用302(临时)重定向测试,以避免缓存问题。
您还需要检查以下规则,因为看起来它会遇到相同的问题。
参考:
There's a couple of issues...
You need to remove that 2nd/last
RewriteCond
directive above as that will break the rule that follows.RewriteCond
directives are conditions that apply to the firstRewriteRule
directive that follows.The first argument to the
RewriteRule
directive takes a regular expression (regex) - as you've used in later rules. It is not a simple URL-path. And, importantly, in.htaccess
the URL-path matched by theRewriteRule
pattern does not start with a slash. (You have omitted the slash prefix in the later rule that is evidentally "working".)It should be like this instead:
You will need to clear your browser cache before testing since the erroneous 301 (permanent) redirect will have been cached by the browser. Test first with 302 (temporary) redirects to avoid caching issues.
You will also need to check the rule that follows, as that looks like it would have the same problem.
Reference: