开发者

What is the differences between redirecting url using `httpd.conf` vs `.htaccess`?

开发者 https://www.devze.com 2023-03-25 08:58 出处:网络
I google on the net and found two approaches to redirect incomi开发者_如何学JAVAng requests to apache in Ubuntu OS: 1) using httpd.conf and 2) using .htaccess.

I google on the net and found two approaches to redirect incomi开发者_如何学JAVAng requests to apache in Ubuntu OS: 1) using httpd.conf and 2) using .htaccess.

I am confused. What are the differences between them?

Please share if you know how.

Thank you!


The .htaccess-file is meant to be used on shared servers where you don't have access to the primary Apache config files. It is generally a better idea to use httpd.conf or your site config rather than .htaccess if you can as this has a lower processing overhead (as far as I know, the .htaccess-file is parsed on each request), but both ways work fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消