Rewrite Engine help

Discussion in 'Apache' started by Emperior Eric, Aug 21, 2007.

  1. #1

    Ok I got things somewhat solved. I realized from a guess connection to PHP that the ! means not. so I changed the code a bit and fixed it from always sending https to http.

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^poparcade\.net$ [NC]
    RewriteRule ^(.*)$ http://www.poparcade.net/$1 [R=301,L]
    Code (markup):
    Now it only redirects if the url does equal http://poparcade.net then it sends it to http://www.poparcade.net I tryed to add this line in but it didn't fix the issue.

    RewriteCond %{HTTP_HOST} ^https://poparcade.net$ [NC]
    RewriteRule ^(.*)$ https://www.poparcade.net/$1 [R=301,L]
    Code (markup):
    So now all I need is a line to redirect if the url is https://poparcade.net to https://www.poparcade.net
     
    Emperior Eric, Aug 21, 2007 IP
  2. VimF

    VimF Well-Known Member

    Messages:
    307
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    118
    #2
    RewriteCond %{HTTPS} on
    RewriteCond %{HTTP_HOST} ^poparcade.net [NC]
    RewriteRule ^(.*)$ https://www.poparcade.net/$1 [R=301,L]
     
    VimF, Aug 22, 2007 IP