使用301重定向的httpd.conf

编程入门 行业动态 更新时间:2024-10-19 21:21:09
本文介绍了使用301重定向的httpd.conf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我读的地方,使用的.htaccess的301重定向,不建议和一个更好的做法将是使用的httpd.conf

  • 是真的吗?为什么?
  • 我们可以使用正则表达式在httpd.conf - 相同的,因为我们做的.htaccess?
  • 解决方案

    好了,一般来说的.htaccess只​​是意味着每个目录设置和httpd.conf中服务器级设置。同时访问的.htaccess 文件增加了一些小的开销,但是这可能不是你的问题。

    是的,你可以使用常规的前pressions在httpd.conf

    I read somewhere that using .htaccess for 301 redirect is not recommended and that a better practice will be to use httpd.conf

  • is that true ? why ?
  • can we use regexp in httpd.conf - the same as we do with .htaccess ?
  • 解决方案

    Well, generally speaking .htaccess is just meant for per-directory settings and the httpd.conf for server wide settings. Also accessing the .htaccess file adds some small overhead but that's probably not your concern.

    And yes, you can use regular expressions in the httpd.conf

    更多推荐

    使用301重定向的httpd.conf

    本文发布于:2023-11-01 01:39:27,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1547873.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:重定向   conf   httpd

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!