Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

htaccess tricky one

  • 20-02-2013 10:23AM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 3,890 ✭✭✭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