.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



to go to

Thanks all!

Have a good night and a great new year!
  • 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.

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


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

    -- 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.

    header('Location: http://your domain name);

    hope this helps...

    That's as technichal as it gets for me LOL
    The Best Hosting Company Hands Down...
    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