Mobile app version of vmapp.org
Login or Join
Cooney921

: Redirect URL with query string to homepage I can't figure out how to make users visiting my website using links like: mysite.com/?ref=XXXXXXX see the homepage instead of a completely blank page.

@Cooney921

Posted in: #Htaccess #Redirects

I can't figure out how to make users visiting my website using links like: mysite.com/?ref=XXXXXXX see the homepage instead of a completely blank page. I tried using htaccess but I can't figure out how to do it.

This is how my .htaccess file looks like:

Options +FollowSymLinks -MultiViews

RewriteEngine On

RewriteCond %{QUERY_STRING} ^ref=(.+)$ [NC]

RewriteRule ^index.php mysite.com/? [L,R=301]

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cooney921

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ravi8258870

Try adding this to a .htaccess file in your document root:

Options +FollowSymLinks -MultiViews

RewriteEngine On

RewriteCond %{QUERY_STRING} ^ref=(.+)$ [NC]
RewriteRule ^index.php$ /? [L,R=301,NC]


Make sure you have the mod_rewrite module installed.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme