mod_rewrite help

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

mod_rewrite help

Post by neophyte »

Here's my rewrite:

Code: Select all

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteRule  %{QUERY_STRING} ^m=07&y=06&entry=entry060731-083034$ http://somesite.com/someurl
</IfModule>
I'm trying to rewrite a URL with the querystring above (http://somefirstsite.com/directory/index.php?:query string above:)to an external site. I can't seem to get this straight. What am I doing wrong.

Thanks
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I think you need a redirect flag. Have you looked at the mod-rewite cheat sheet in the Apache, IIS and Servers forum?
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Thanks for the tip Everah!
Post Reply