just a quick question! i am forcing my site to redirect from http to https. The way im doing it is in my httpd.conf file, i have in my virtual hosts a
redirect permanent / https://sitename
everything works fine and I got that setting from apache’s wiki site! but my question is, which is faster the redirect permanent or using the mod_rewrite way?
Ive seen in some sites suggesting to use something like:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
but nobody explains if that way gets better performance than using redirect permanent or not? my site gets 1000+ visits per day and handles large files!
basically what is the difference between the two? I just want to make sure i am optimized for best performance 😉
PS. everything is done in my httpd.conf and NOT in .htaccess 😉
That’s nothing; you really don’t need to worry about the relative performance at that level of traffic.
Both methods are trivial performance-wise relative to whatever your site is actually doing for its pages.