Isaak,
Beautiful! That's the one. Thanks so much for your help.
Scott
Isaak Malik-3 wrote:
>
> Well.. Since more are against my method than for it tweaked your .htaccess
> code a bit:
>
> RewriteEngine On
> RewriteCond %{HTTP_HOST} ^example\.com
> RewriteRule (.*) http://www.example.com/$1 [R=301,L]
>
>
> On Thu, Jun 12, 2008 at 6:22 PM, Karol Grecki <[EMAIL PROTECTED]> wrote:
>
>>
>> This would send 302, not 301 header
>>
>>
>> Isaak Malik-3 wrote:
>> >
>> > Why not just simply use:
>> >
>> > <?php
>> >
>> > if ( !preg_match('/^www\./i', $_SERVER['HTTP_HOST']) )
>> > header('Location: http://www.example.com');
>> <http://www.example.com/>
>> >
>> > ?>
>> >
>> > On Thu, Jun 12, 2008 at 5:40 PM, Scott Lively <[EMAIL PROTECTED]>
>> wrote:
>> >
>> >> How would you do a 301 redirect like the following?
>> >>
>> >>
>> >>
>> >> http://example.com to
>> >>
>> >> http://www.example.com
>> >>
>> >>
>> >>
>> >> I've tried adding the following to my .htaccess file:
>> >>
>> >>
>> >>
>> >> RewriteEngine on
>> >>
>> >> rewritecond %{http_host} ^example.com [nc]
>> >>
>> >> rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]
>> >>
>> >>
>> >>
>> >> yet I get 400 Bad Request error.
>> >>
>> >>
>> >>
>> >> Does this need to be done somewhere in the Zend_Controller?
>> >>
>> >>
>> >>
>> >> Thanks,
>> >>
>> >>
>> >>
>> >> Scott Lively
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Isaak Malik
>> > Web Developer
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/301-redirect-tp17803242p17803976.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Isaak Malik
> Web Developer
>
>
--
View this message in context:
http://www.nabble.com/301-redirect-tp17803242p17805225.html
Sent from the Zend Framework mailing list archive at Nabble.com.