Forum Moderators: phranque

Message Too Old, No Replies

Why i put 301 and give me 302 message

Some one could answer me? Thanks

         

bbbandit

8:44 pm on Sep 29, 2005 (gmt 0)

10+ Year Member



Hi, I`m trying to put on a several second domains, that i have, foward to a primay domain, i try with several 301 codes, like the ones i get here in this forum:
-----------------------------------------------------
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?(domain1¦domain2¦domainN)\.tld$
RewriteRule ^(.*) http://www.example.com/$1 [R=301,L]
----------------------------------------------------
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} extradomain1.net$ [OR]
RewriteCond %{HTTP_HOST} extradomain2.com$ [OR]
RewriteCond %{HTTP_HOST} extradomain2.org$
RewriteRule ^(.+) http://www.example.com/$1 [L,R=301]
---------------------------------------------------
I apreciate some help here

[edited by: jdMorgan at 1:41 am (utc) on Sep. 30, 2005]
[edit reason] Examplified & de-linked. [/edit]

jdMorgan

1:46 am on Sep 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



bbbandit,

Welcome to the Apache forum?

Please provide as much information as you can. It really helps you to get better answers.

What happens when you test this code, and how do the results differ from what you expect?

Do you see any information related to the test requests in your server error log?

Is your DNS configured to 'point' these other domains to your server?

Is your server configured to accept requests for these other domain?

Are you sure that mod_rewrite code is being executed on your server?

Do you have other mod_rewrite code in your .htaccess or httpd.conf file that could affect the results?

Jim

bbbandit

11:16 am on Sep 30, 2005 (gmt 0)

10+ Year Member



HI

im a newbie.I was trying some 301 codes (like the ones before)in .htaccess at "www.mydomain.pt", to forward "www.mydomain.com/net/de/co.uk" to "www.mydomain.pt", i think they dont result because i dont put 644 mod_rewrite code (they give me 302). but then i went to try forwarding "www.mydomain.pt" to "www.mydomain.pt/catalog" and put 644 mod_rewrite code with:

RedirectMatch 301 (.*)\.html$ [mydomain.pt...]

and work! but i want to Know how to put 200 codes back on my 301 codes, because i make a big mess with some sub-domains. I apreciate all the help you can spare me.