...

View Full Version : [resolved] redirect while masking the URL?



Mechphisto
08-05-2011, 03:08 PM
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/pages/suinfo.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! :)

Mechphisto
08-05-2011, 04:13 PM
Nevermind, found it:


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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum