.htaccess help please

by brp002
4 replies
Hey everyone I just wanted to wish everyone a happy new year.

My script sometimes auto refreshes when it certain games are played and it will have the same domain with the extension ?refresh=true

I was wondering if i could write an htaccess file that when the ?refresh=true comes up it reverts back to the original page

example:

www.domain.com/?refresh=true

to go to
www.domain.com

Thanks all!

Have a good night and a great new year!
#htaccess
  • Profile picture of the author HomeBizNizz
    Why not in PHP...?
    It would maybe easier.
    {{ DiscussionBoard.errors[1561570].message }}
  • Profile picture of the author Voon
    If you have mod_rewrite enabled, then this might help.

    Code:
    RewriteEngine On
    RewriteCond %{QUERY_STRING} refresh=true
    RewriteRule (.*) http://www.domain.com/$1? [R=301]
    Still, I agree using PHP would be easier..
    Signature

    .

    {{ DiscussionBoard.errors[1562051].message }}
  • Profile picture of the author lisag
    Code:
    Options +FollowSymlinks
    RewriteEngine On
    RewriteCond %{QUERY_STRING} . 
    RewriteRule domain.com/?refresh=true /foo.php? [L]
    Signature

    -- Lisa G

    {{ DiscussionBoard.errors[1569262].message }}
  • Profile picture of the author therealdeal
    maybe this php code will do it for you.

    just save this as a index.php file

    insert your domain and it should revert to whatever site you want.

    <?php
    header('Location: http://your domain name);
    ?>

    hope this helps...

    That's as technichal as it gets for me LOL
    Signature
    The Best Hosting Company Hands Down...
    http://newhostnow.com
    Enter the coupon code: 1cent
    for your first months hosting for just $0.01 cent. Yep it's that easy!
    {{ DiscussionBoard.errors[1569278].message }}

Trending Topics