Link to home
Start Free TrialLog in
Avatar of GVNPublic123
GVNPublic123

asked on

mod_rewrite noob here

Hello,

So I have a site:
domain.com/index.php?ref=154

ref contains ID of referrer who gets an award if someone signs up trough his link.
However, Id like to make link shorter and look like this:
domain.com/?ref=154

I've never used mod_rewrite before, but I think it could do this job. I only want this to work with index.php.

Thanks
Avatar of GVNPublic123
GVNPublic123

ASKER

Or better yet if I name it r instead of ref.
domain.com/index.php?r=154
domain.com/?r=154
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Steve Bink
I don't think you want mod_rewrite at all for this.  What you want is a properly set DefaultDocument directive.

I'm presuming you want users to click on a link for "http://domain1.com/?r=154" and arrive at your index.php.  Is that correct?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ray, I just tried it without mod-rewrite and it works. :P