Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder
    Join Date
    Jun 2010
    Posts
    296
    Thanks
    64
    Thanked 8 Times in 8 Posts

    SOLVED: How to rewrite all requests, with a single exception in .htaccess?

    I would like to be able to rewrite all requests so that mypage.html is loaded, with the exception of requests for yourpage.html, which should not be rewritten.

    I have gotten as far as this:

    Code:
    RewriteRule . mypage.html
    But how do I stop requests for yourpage.html being rewritten?

    EDIT: Solved:

    RewriteRule ^yourpage\.html$ - [L]
    RewriteRule .* mypage.html [L]
    Last edited by XmisterIS; 07-08-2013 at 05:57 PM. Reason: Solved the problem.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •