Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

htaccess tricky one

Options
  • 20-02-2013 10:23am
    #1
    Registered Users Posts: 648 ✭✭✭


    Hi there

    i have a little issue that some of you may be able to sort please

    in my htaccess i have

    RewriteRule apply /index.php?option=com_loans&view=apply&Itemid=102 [R=301,L,QSA]


    basically meaning any get requests to apply will be sent on


    however i have a page apply.html which with the above is no longer accessible as it creates a redirect loop


    anyone know how to change the htaccess declaration so as only apply forwards on ?


    tnx


Comments

  • Registered Users Posts: 3,886 ✭✭✭cgarvey


    Probably a couple of things at play here.

    First your "apply" needs to be further restricted (using regex) so that it doesn't also match apply.html or /a/apply/b/test.html, etc. Probably best to be as tight as you can in that regex. E.g.
    RewriteRule ^apply/$ ...
    
    .. or if it's just "/apply" (document rather than folder), then..
    RewriteRule ^apply$ ...
    

    Secondly, by default MultiViews will serve up apply.html (if it exists at the same level you're rewriting for: e.g. /apply and /apply.html) before processing your rewrite rules. So if that's the case, you might want to disable it:
    Options -MultiViews
    


    .cg


Advertisement