Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2008-01-23, 09:56 AM   #1
ronnie
Wheither you think you can or you think you can't, Your right.
 
Join Date: Jun 2004
Location: midwest
Posts: 2,274
Send a message via ICQ to ronnie
Faster Meta Refresh?

On one of my domains, when a user hits or types in the domain name, I want them to go to a specific url. I am currently using meta refresh and content set to 0. It works fine, but even with the setting of "0" there is still a slight delay.

As for the index page I even set up a blank white page, so it looks pretty much normal, but I still am not crazy about the little delay. Also since the url I want to forward to is a dynamic url, not a static page, I can not map the domain to the url.

Is there any other way, or do I just live with the delay? Any Ideas?
ronnie is offline   Reply With Quote
Old 2008-01-23, 10:24 AM   #2
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
You can do it with htaccess

Code:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) http://whereyouwanttosendthem/ [L]
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2008-01-23, 10:48 AM   #3
ronnie
Wheither you think you can or you think you can't, Your right.
 
Join Date: Jun 2004
Location: midwest
Posts: 2,274
Send a message via ICQ to ronnie
Thank you! Didn't even think about that. Will give it a try...
ronnie is offline   Reply With Quote
Old 2008-01-26, 05:26 PM   #4
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Code:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* http://whereyouwanttosendthem/ [L,R=301]
You may want to add the R=301 to give the surfer a 301 redirect. The default mod_rewrite redirect is a 302, which is a temporary redirect and was the cause of 'google scraping' where the temporary redirect and resulting page were considered dupes.

If its an unconditional redirect, you don't even need the RewriteCond rule to be there.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Reply


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

Forum Jump


All times are GMT -4. The time now is 06:48 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc