Apache htaccess

Discussion in 'Apache' started by MCruz, Jul 31, 2015.

  1. #1
    I'm a beginner on Apache .htaccess files.

    I have made a rule to redirect, when i put ww.mywebsites.com goes to www.mywebsites.com /sites/test, the rule is:

    RewriteRule %{REQUEST_URI} !(.*)sites/test
    RewriteRule ^(.*)$ sites/test/$1 [L]

    How can I do another rule to redirect www.mywebsites.com /login to www.mywebsites.com /login
    Because the rule above is invalidating the access to /login

    Can someone give me a tip.
    thanks
     
    MCruz, Jul 31, 2015 IP
  2. MCruz

    MCruz Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    I have the following folder structure:
    • www-root
      • /sites/test ->Frontend
        • Config
        • Etc
      • /login -> Backend
    With this rule, bellow, when I put in my browser www.mywebsites.com I access to /sites/test
    RewriteRule %{REQUEST_URI} !(.*)sites/test
    RewriteRule ^(.*)$ sites/test/$1 [L]

    Can someone tell me what rule I have to put to access also to /login.

    thanks
     
    MCruz, Jul 31, 2015 IP