Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   Faster Meta Refresh? (http://www.greenguysboard.com/board/showthread.php?t=45081)

ronnie 2008-01-23 09:56 AM

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?

Cleo 2008-01-23 10:24 AM

You can do it with htaccess

Code:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) http://whereyouwanttosendthem/ [L]


ronnie 2008-01-23 10:48 AM

Thank you! Didn't even think about that. Will give it a try...:)

cd34 2008-01-26 05:26 PM

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.


All times are GMT -4. The time now is 04:35 AM.

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