URL issue

Hey

I’ve just made a referral system for my site where users get tokens if they get another member to signup.
Problem is, the URL is really long, eg:

http://site.actualsite.com/index.php?action=signup&referral=456655

I need to know how i can do it so that users can just go to

http://site.actualsite.com/?referral=434545

and it will carry the querystring to the index page.

Thanks

You can add this url rewrite rule to your .htaccess file:

RewriteEngine on
RewriteCond %{QUERY_STRING}  ^referral=([\d]+)$
RewriteRule ^/$ /index.php?action=signup&referral=%1 [L]

Thanks.

I’m really struggling, can’t find my htaccess >:(

Sorted it, cheers man.

Sponsor our Newsletter | Privacy Policy | Terms of Service