301 Redirect and Security

Discussion in 'Site & Server Administration' started by sajez, May 26, 2010.

  1. #1
    Hi,

    I want to redirect all my domains from www to non-www and I found the following solution.

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
    RewriteRule ^(.*) http://%1/$1 [R=301,L
    PHP:
    But in my notes I found a note for myself that using a domain-independent redirect can cause security issues (unfortunately I do not know where I got this info from).

    Can this really cause security problems? And if so, can someone maybe explain why? Or is the code save to use?

    Thank you very much :)!
     
    sajez, May 26, 2010 IP
  2. Peham

    Peham Greenhorn

    Messages:
    18
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #2
    ya need this question answered as well... :p
     
    Peham, May 31, 2010 IP