Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 31st Dec 2009, 06:54 PM   #1
HyperActive Warrior
 
Join Date: 2009
Posts: 283
Thanks: 5
Thanked 5 Times in 5 Posts
Default
.htaccess help please
Share on: 
fb share twitter share gplus share more share

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!

If you want a link here please email me!
brp002 is offline  
Unread 31st Dec 2009, 11:49 PM   #2
A rat after money...
War Room Member
 
HomeBizNizz's Avatar
 
Join Date: 2009
Location: Inside a cheese...
Posts: 770
Thanks: 365
Thanked 80 Times in 68 Posts
Default
Re: .htaccess help please
Share on: 
fb share twitter share gplus share more share

Why not in PHP...?
It would maybe easier.
HomeBizNizz is offline  
Unread 1st Jan 2010, 04:41 AM   #3
From IT to IM
War Room Member
 
Voon's Avatar
 
Join Date: 2009
Location: The World Is Flat
Posts: 37
Thanks: 36
Thanked 5 Times in 5 Posts
Default
Re: .htaccess help please
Share on: 
fb share twitter share gplus share more share

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

.
Voon is offline  
Unread 3rd Jan 2010, 07:50 AM   #4
Lisa Dozois
War Room Member
 
lisag's Avatar
 
Join Date: 2006
Location: Florida, USA.
Posts: 608
Thanks: 107
Thanked 254 Times in 118 Posts
Default
Re: .htaccess help please
Share on: 
fb share twitter share gplus share more share

Code:
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{QUERY_STRING} . 
RewriteRule domain.com/?refresh=true /foo.php? [L]

-- Lisa G
lisag is offline  
Unread 3rd Jan 2010, 07:57 AM   #5
Darren "The Real Deal"
War Room Member
 
therealdeal's Avatar
 
Join Date: 2009
Location: CA
Posts: 42
Thanks: 6
Thanked 6 Times in 5 Posts
Blog Entries: 3
Default
Re: .htaccess help please
Share on: 
fb share twitter share gplus share more share

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

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!
therealdeal is offline  
Closed Thread


Bookmarks

Tags
htaccess


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 11:07 PM.