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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Mar 2009
    Posts
    101
    Thanks
    14
    Thanked 1 Time in 1 Post

    Question [resolved] redirect while masking the URL?

    I'm trying to set up a redirect rule so that URL 1 redirects to URL 2 (on same server) but the browser's URL bar still reflects URL 1.

    Example:
    I want browser requests for:
    http://www.girlscoutsmoheartland.org/su
    (as well as http://www.girlscoutsmoheartland.org/su?su=x )

    to redirect to:
    http://www.girlscoutsmoheartland.org/pages/suinfo.php
    (or http://www.girlscoutsmoheartland.org...uinfo.php?su=x)

    but the URL bar to stay saying:
    http://www.girlscoutsmoheartland.org/su

    Now, I've actually got the redirect part working fine. But anything I try regarding the masking part just throws a 500 (or even a 404) error.

    One of the examples I tried:
    RewriteRule ^/su(.*)$ http://www.girlscoutsmoheartland.org/pages/suinfo.php$1 [P,L]

    and I've tried various combinations of:
    ^/su$
    ^/su(*)$
    ^/su*$
    and...
    [P,L]
    [R=301,L]

    What am I doing wrong? I appreciate any help!
    Last edited by Mechphisto; 08-05-2011 at 04:15 PM.

  • #2
    Regular Coder
    Join Date
    Mar 2009
    Posts
    101
    Thanks
    14
    Thanked 1 Time in 1 Post
    Nevermind, found it:

    Code:
    RewriteRule ^su$ pages/suinfo.php [L,QSA]


  •  

    Posting Permissions

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