简体   繁体   中英

301 redirect using 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

  1. is that true ? why ?
  2. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM