.htaccess 301 redirect affecting frontpage

Discussion in 'Apache' started by zenite, Apr 8, 2007.

  1. #1
    i redirected my http:// to http://www. but this seems to cause a problem with frontpage. i can't upload my files to the server using the Publish Web option, to the url http:// as the url cannot be found. tried to upload to http://www but didn't work.

    seems i have to disable 301 redirect each time i upload. is there a better alternative, this is getting kind of irritating.
     
    zenite, Apr 8, 2007 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Post the .htaccess code.
     
    Nintendo, Apr 9, 2007 IP
  3. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #3
    Did you replace or add to the existing file?

    FrontPage can be onery about most things and the .htaccess file is one of them. Since I gave up on using it to publish about 30 days after I bought it I can't recall the details. That was 6 years ago.
     
    Colbyt, Apr 9, 2007 IP
  4. zenite

    zenite Peon

    Messages:
    240
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i add to the existing files.

    heres the code

    ErrorDocument 404 /error/404.html
    #301 redirect
    RewriteEngine on
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^www\.healthsession\.com
    RewriteRule (.*) http://www.healthsession.com/$1 [R=301,L]
     
    zenite, Apr 9, 2007 IP
  5. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #5
    If you added that line remove it and you should be fine.

    Now maybe FP put that in there for some reason but that is nothing I have ever seen before.

    I think the error handler line is proper syntax. I would have to look it up to be sure.

    Edit:
    is correct if your file 404.html is located in a directory named error. If it is in the root directorty, delete /error from that line.

    The complete and proper syntax is ErrorDocument 404 http://www.domainname.com/directory/filename and the http://domainname.com may be omitted for a 404.
     
    Colbyt, Apr 9, 2007 IP
  6. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #6
    #301 redirect

    does nothing. Any line starting with # does nothing.
     
    Nintendo, Apr 9, 2007 IP
  7. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #7
    I apologize. I misread that whole thing. I did not catch that you were using FP to publish the web. I hate that software!

    Change your publishing destination to to the one you redirected to, the one you want to use. If FP won't let you do contact MS. That program is their virus.
     
    Colbyt, Apr 9, 2007 IP
  8. zenite

    zenite Peon

    Messages:
    240
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #8
    yeah, its in a folder call error. guess its frontpage problem again then? *keyword: again*:(
     
    zenite, Apr 9, 2007 IP