Author Topic: htaccess Rewrite Rule  (Read 130 times)

rvtraveller

  • The very scary
  • Administrator
  • Hero Member
  • *****
  • Posts: 1187
    • View Profile
htaccess Rewrite Rule
« on: November 03, 2011, 04:46:42 PM »
Need some help coming up with a rewrite rule.

I want to take this URL:  google.com/main?url=888888888888888888888&ablock=
And rewrite it to this:  google.com/main.php?url=8888888888888888888888&ablock=

I thought this code would work but it is not passing the arguments properly:

Code: [Select]
RewriteRule ^main?$ block.php$1 [QSA]

Any suggestions?
« Last Edit: November 03, 2011, 04:49:01 PM by rvtraveller »

rvtraveller

  • The very scary
  • Administrator
  • Hero Member
  • *****
  • Posts: 1187
    • View Profile
Re: htaccess Rewrite Rule
« Reply #1 on: November 03, 2011, 04:49:32 PM »
Well, turns out I was trying to reference them in the PHP script as POST variables and not GET variables.  Boy do I feel stupid now.