Redirecting 'example.com/directory/' to 'example.com/'

Discussion in 'Apache' started by AdamSee, Sep 12, 2006.

  1. #1
    Apparently this should work:

    
    RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
    RewriteCond %{REQUEST_URI} !^/directory(/.*)?$
    RewriteRule .* /directory%{REQUEST_URI} [QSA,L] 
    Code (markup):
    But it doesn't. Could it be the http.conf file on my host that's overwriting it?
     
    AdamSee, Sep 12, 2006 IP
  2. AdamSee

    AdamSee Well-Known Member

    Messages:
    422
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    135
    #2
    It did work. Hosting companies webspace was broken.
     
    AdamSee, Sep 12, 2006 IP