Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

301 v alias

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Apache on pc #2  
Author Message
user2450

External


Since: Aug 29, 2003
Posts: 10



(Msg. 1) Posted: Tue Jun 22, 2004 8:54 pm
Post subject: 301 v alias
Archived from groups: alt>apache>configuration (more info?)

i have multiple domains pointing to the same website using alias

i have been told search enigines such as google may not like this and that i
should use a 301 redirect instead


<VirtualHost *>
ServerAdmin webmaster.DeleteThis@xxxxxl.com
DocumentRoot /usr/home/xxxxxl
ServerName www.xxxxxl .com
ServerAlias www.xxxxxertl.com
ServerAlias www.xxxxxrtl.com
ServerAlias www.xxxxx23l.com
ErrorLog logs/xxxxxl .com-error_log
CustomLog logs/xxxxxl .com-access.log "combined"
scriptalias /cgi-bin/ /usr/home/xxxxxl/cgi-bin/
DirectoryIndex index.htm index.html index.php
</VirtualHost>


can anyone tell me the best way to apply this and get the alias to bring up
the main site instead.

Any thoughts on using 301 over alias, a good idea?

 >> Stay informed about: 301 v alias 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Tue Jun 22, 2004 8:54 pm
Post subject: Re: 301 v alias [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Andy <me RemoveThis @privacy.net> wrote:
 > i have been told search enigines such as google may not like

I don't see why they shouldn't like this and like instead the
redirect. A server alias is perfectly transparent. Ok, it could lead
the search engine to store multiple time the same page as coming from
different servers while it's coming from one server only, but if you
used the UseCanonicalName option then the URL will be rewritten and
the server will react like a redirect without a redirect.

Anyway... why do you bother about what search engine likes or not?

Davide

--
| Ignisecond, n.: The overlapping moment of time when the hand is
| locking the car door even as the brain is saying, "my keys are in
| there!" -- Rich Hall, "Sniglets"
|<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: 301 v alias 
Back to top
Login to vote
hans1

External


Since: Mar 29, 2004
Posts: 672



(Msg. 3) Posted: Wed Jun 23, 2004 3:27 am
Post subject: Re: 301 v alias [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Davide Bianchi" <davideyeahsure.RemoveThis@onlyforfun.net> schreef in bericht
news:2jr9c5F1452b9U6@uni-berlin.de...
 > Andy <me.RemoveThis@privacy.net> wrote:
  > > i have been told search enigines such as google may not like
 > I don't see why they shouldn't like this and like instead the
 > redirect. A server alias is perfectly transparent. Ok, it could lead
 > the search engine to store multiple time the same page as coming from
 > different servers while it's coming from one server only, but if you
 > used the UseCanonicalName option then the URL will be rewritten and
 > the server will react like a redirect without a redirect.
Personally, I dislike aliassing as it crums my cookies.
Some almost-in-use rewrites ...

# in server context enforce redirecting a serverless domain
# 'www' may vary per machine
RewriteCond %{HTTP_HOST} ^[^\.]+\.[^\.]+$
RewriteRule (.*) <a style='text-decoration: underline;' href="http://www.%" target="_blank">http://www.%</a>{HTTP_HOST}$1 [R=301,L,QSA]

# in the first <virtualhost ...> force redirecting a would-be-aliassed
domain
# _one_ vhost services and logs all redirects for any other vhost
RewriteMap lc int:tolower
RewriteRule ^/*(.*)$ /${lc:%{HTTP_HOST}|NONE}/$1 [QSA]
RewriteMap domain txt:/etc/apache2/domains.txt
RewriteRule ^/([^\.])+(\.[^\.]+\.[^/]+)/(.*) <a style='text-decoration: underline;' href="http://$1.$" target="_blank">http://$1.$</a>{domain:$2}/$3
[R=301,L,QSA]

Given OP's examples, domains.txt would read like
xxxxxertl.com xxxxxl.com
xxxxxrtl.com xxxxxl.com
xxxxx23l.com xxxxxl.com

HansH<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: 301 v alias 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
an alias for use a dll as a cgi ! - Hello, I don't find this option in Apache : how to use a .dll and alias it as a .cgi. Example :I want "azerty.dll" to be alias and named "azerty.cgi" in httpd.conf. I found it on Alibaba server : it names DLL alias you enter an Alia...

Alias vs. ScriptAlias - I have a directory (on Unix) with both .html and .cgi files. When I point to the directory with an Alias directive, the html files work but the perl CGI's show the text rather than executing. With the ScriptAlias directive, the CGI's work but the .htm...

problem with alias - hi i use suse 9.0 and apache 2 i hav a directory in my serverroot and i can normaly access it then i create an alias like this: Alias /test/ "/srv/www/htdocs/_tmp/" &lt;Directory "/srv/www/htdocs/_tmp"&gt; Op...

Alias directive - When I use an alias directive in httpd.conf such as: Alias /mp3 "d:/Media/Music" .... should I also have a suitable Directoty directive, suchs as: <Directory "d:/Media/Music"> Options All Order allow,deny Allow fr...

Problems with alias - Hello alltogether, we've got 4 apache-server running on linux-servers, listening on port 7000. External traffic comming on port 80 is directet to this internal port by an loadbalancer. On this server we got some aliases defined, such as alias /shop....
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]