Webseite erreichbar mit und ohne "www"

  • quattrossa quattross...
    TYPO3-Anwärter
    0 x
    7 Beiträge
    0 Hilfreiche Beiträge
    20. 07. 2010, 17:09

    Guten Tag
    ich wollte mal nachfrage die Experte wo ich so was anpassen kann.
    Meine Seite ist zur zeit erreichbar mit und ohne "www".
    Zu vermeiden von doppel content, würde ich gerne der domains ohne "www" löschen.
    Wo kann ich einstellen das die ohne "www" gelöscht wird?

    In meine Root in BE unter "liste" sehe ich zwar das dort eine quattrossa.com gibt neben eine http://www.quattrossa.com als Domain.
    Der "quattrossa.com" ist aber versteckt und wird nicht beutzt.

    Muss ich etwas in HTaccess ändern?
    Ich poste hier mal meine htaccess, vielleicht fällt jemand etwas auf:

    ----------------------------- htaccess------------------------------------

    ### Begin: Rewrite stuff ###

    # Enable URL rewriting
    RewriteEngine On

    # To assist in debugging rewriting, you could use these lines
    # DON'T enable it for production!
    # This will only work in httpd.conf, not in .htaccess files
    #RewriteLog /var/log/apache/rewrite.log
    #RewriteLogLevel 9

    # If you use the RealUrl extension, then you'll have to enable the next line.
    # You will have to change this path if your TYPO3 installation is located
    # in a subdirectory of the website root.
    #
    # If you place this in httpd.conf, you cannot use this directive in any case!
    #RewriteBase /

    # Stop rewrite processing if we are in the typo3/ directory
    # For httpd.conf, use this line instead of the next one:
    # RewriteRule ^/TYPO3root/(typo3/|t3lib/|tslib/|fileadmin/|typo3conf/|typo3temp/|uploads/|showpic\.php|favicon\.ico) - [L]RewriteRule ^(typo3/|t3lib/|tslib/|fileadmin/|typo3conf/|typo3temp/|uploads/|showpic\.php|favicon\.ico) - [L]

    # Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
    # and stop the rewrite processing
    # For httpd.conf, use this line instead of the next one:
    # RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]RewriteRule ^typo3$ typo3/index_re.php [L]

    # If the file/symlink/directory does not exist => Redirect to index.php
    # Important note: If you copy/paste this into httpd.conf instead
    # of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
    # '%{REQUEST_FILENAME}' part.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

    # Main URL rewriting.

    # If you use Windows and SimulateStaticDocuments do not work, try adding a
    # slash (/) right before 'index.php' below.

    # The example shows how to rewrite only *.html and *.pdf files to index.php
    # This may be helpful when using an extension that can generate PDF files
    # on the fly.
    # Example: RewriteRule .*\.(html|pdf)$ index.php [L]

    # For httpd.conf, use this line instead of the next one that has no '#':
    # RewriteRule .* /TYPO3root/index.php [L]

    # For use with the RealUrl extension, you might need to remove the
    # RewriteBase directive somewhere above and use this line instead of the
    # next one:
    # RewriteRule .* /index.php [L]

    RewriteRule .* index.php [L]

    ### End: Rewrite stuff ###

    ### Begin: PHP optimisation ###

    # All features below are left to the default if you don't change this.
    # Simply remove the comment marks if you want to use some/all of these
    # settings

    # The PHP developers recommend disabling this feature. Do that.
    # It's deprecated and is likely to be unsupported in future versions of PHP.
    #php_flag allow_call_time_pass_reference off

    # TYPO3 works fine with register_globals turned off.
    # This is highly recommended!
    #php_flag register_globals off

    # PHP may not declare the argv & argc variables (that would contain the GET
    # information).
    # TYPO3 doesn't need this, so just turn it off.
    #php_flag register_argc_argv off

    # Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
    #php_flag magic_quotes_gpc off

    # Order in which PHP registers GET, POST, Cookie and Built-in variables
    #php_value variables_order GPCS

    ### End: PHP optimisation ###

    ### Begin: Miscellaneous ###

    # Make sure that directory listings are disabled
    #Options -Indexes

    # There is a problem with Internet Explorer and mod_gzip on Apache servers.
    # For more information, see
    # http://typo3.org/documentation/document-library/rtehtmlarea/Tutorial-79/
    #mod_gzip_item_exclude file \.css$
    #mod_gzip_item_exclude file \.png$
    #mod_gzip_item_exclude file \.gif$
    #mod_gzip_item_exclude file \.jpg$
    #mod_gzip_item_exclude file \.jpeg$
    #mod_gzip_item_exclude file \.js$

    ### End: Miscellaneous ###

    # Add your own rules here
    # ...
    RewriteEngine On
    RewriteRule ^/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)$ - [L]RewriteRule ^/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/.*$ - [L]RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule .* index.php

    -------------------------------ende htaccess-----------------------------------------

    hoffe auf eine Tipps , Danke
    Antonio


  • 1
  • Michaelh74 Michaelh7...
    Jedi-General
    0 x
    1519 Beiträge
    0 Hilfreiche Beiträge
    21. 07. 2010, 09:47

    Entweder über eine Domain-Record in Deinem TYPO3 System. Oder wie schon richtig vermutet in der .htaccess (ist in der standard natürlich nicht drin). Hat hier aber nicht grundsätzlich was mit T3 zu tun, sondern ist allgemeingültig. Per Google findest Du sicher schnell den genauen Eintrag in Deine .htaccess.

    Gruß
    Michael

    PS: im Grund wird alles außer http://www. auf http://www.deineDomain.de umgeleitete mit 301 permanent redirect

  • froemken froemken
    Jedi-Ratsmitglied
    0 x
    811 Beiträge
    1 Hilfreiche Beiträge
    23. 07. 2010, 11:02

    htaccess und doppelten content habe ich auch hier mal erklärt:

    http://typo3.sfroemken.de/server/htaccess.html?L=0

    such da mal nach "doppelter content"

  • bagstage bagstage
    T3PO
    0 x
    17 Beiträge
    0 Hilfreiche Beiträge
    11. 02. 2011, 15:30

    Hallo,

    unsere htaccess sieht so aus:

    1. #####
    2. #
    3. # Example .htaccess file
    4. #
    5. # This file contains a collection of almost everything you will need
    6. # for optimising TYPO3:
    7. #
    8. # - mod_rewrite (used for SimulateStaticDocuments, RealUrl, etc.)
    9. # - PHP optimisation
    10. #
    11. # If you want to use it, you'll need to rename this file to '.htaccess'.
    12. # (To make this work you will need to adjust the 'AllowOverride'
    13. # directive in your Apache configuration file.)
    14. #
    15. # IMPORTANT: You may need to change this file depending on your TYPO3
    16. # installation!
    17. #
    18. # You should change every occurance of TYPO3root/ to the location where you
    19. # have your website in. For example:
    20. # If you have your website located at http://mysite.com/
    21. # then your TYPO3root/ is just empty (remove 'TYPO3root/')
    22. # If you have your website located at http://mysite.com/some/path/
    23. # then your TYPO3root/ is some/path/ (search and replace)
    24. #
    25. # If you have problems with this file, try using the minimal
    26. # mod_rewrite.htaccess which is located in the typo3_src/misc/
    27. # directory of this installation.
    28. #
    29. # You can also use this configuration in your httpd.conf, but you'll have
    30. # to modify some lines, see the comments (search for 'httpd.conf')
    31. #
    32. # Using rewriting in your httpd.conf is much faster, btw.
    33. #
    34. # Questions about this file go to the matching Install mailing list,
    35. # see http://typo3.org/documentation/mailing-lists/
    36. #
    37. ####
    38.  
    39. ### Begin: Rewrite stuff ###
    40.  
    41. # Enable URL rewriting
    42. RewriteEngine On
    43.  
    44. # To assist in debugging rewriting, you could use these lines
    45. # DON'T enable it for production!
    46. # This will only work in httpd.conf, not in .htaccess files
    47. #RewriteLog /var/log/apache/rewrite.log
    48. #RewriteLogLevel 9
    49.  
    50. # If you use the RealUrl extension, then you'll have to enable the next line.
    51. # You will have to change this path if your TYPO3 installation is located
    52. # in a subdirectory of the website root.
    53. #
    54. # If you place this in httpd.conf, you cannot use this directive in any case!
    55. #RewriteBase /
    56.  
    57. # Stop rewrite processing if we are in the typo3/ directory
    58. # For httpd.conf, use this line instead of the next one:
    59. # RewriteRule ^/TYPO3root/(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]
    60. RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico|awstats|stats|cgi-bin|robots\.txt)/ - [L]
    61.  
    62. # Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
    63. # and stop the rewrite processing
    64. # For httpd.conf, use this line instead of the next one:
    65. # RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
    66. RewriteRule ^typo3$ typo3/index_re.php [L]
    67.  
    68. # If the file/symlink/directory does not exist => Redirect to index.php
    69. # Important note: If you copy/paste this into httpd.conf instead
    70. # of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
    71. # '%{REQUEST_FILENAME}' part.
    72. RewriteCond %{REQUEST_FILENAME} !-f
    73. RewriteCond %{REQUEST_FILENAME} !-d
    74. RewriteCond %{REQUEST_FILENAME} !-l
    75.  
    76. # Main URL rewriting.
    77.  
    78. # If you use Windows and SimulateStaticDocuments do not work, try adding a
    79. # slash (/) right before 'index.php' below.
    80.  
    81. # The example shows how to rewrite only *.html and *.pdf files to index.php
    82. # This may be helpful when using an extension that can generate PDF files
    83. # on the fly.
    84. # Example: RewriteRule .*\.(html|pdf)$ index.php [L]
    85.  
    86. # For httpd.conf, use this line instead of the next one that has no '#':
    87. # RewriteRule .* /TYPO3root/index.php [L]
    88.  
    89. # For use with the RealUrl extension, you might need to remove the
    90. # RewriteBase directive somewhere above and use this line instead of the
    91. # next one:
    92. # RewriteRule .* /index.php [L]
    93.  
    94. RewriteRule .* index.php [L]
    95.  
    96. # Doppelten Content vermeiden
    97. # RewriteCond %{HTTP_HOST} ^bag-stage\.de$ [NC]
    98. # RewriteRule ^(.*)$ www.bag-stage.de/$1 [R=301,L]
    99.  
    100. ### End: Rewrite stuff ###
    101.  
    102. ### Begin: PHP optimisation ###
    103.  
    104. # All features below are left to the default if you don't change this.
    105. # Simply remove the comment marks if you want to use some/all of these
    106. # settings
    107.  
    108. # The PHP developers recommend disabling this feature. Do that.
    109. # It's deprecated and is likely to be unsupported in future versions of PHP.
    110. #php_flag allow_call_time_pass_reference off
    111.  
    112. # TYPO3 works fine with register_globals turned off.
    113. # This is highly recommended!
    114. #php_flag register_globals off
    115.  
    116. # PHP may not declare the argv & argc variables (that would contain the GET
    117. # information).
    118. # TYPO3 doesn't need this, so just turn it off.
    119. #php_flag register_argc_argv off
    120.  
    121. # Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
    122. #php_flag magic_quotes_gpc off
    123.  
    124. # Order in which PHP registers GET, POST, Cookie and Built-in variables
    125. #php_value variables_order GPCS
    126.  
    127. ### End: PHP optimisation ###
    128.  
    129. ### Begin: Miscellaneous ###
    130.  
    131. # Make sure that directory listings are disabled
    132. #Options -Indexes
    133.  
    134. # There is a problem with Internet Explorer and mod_gzip on Apache servers.
    135. # For more information, see
    136. # http://typo3.org/documentation/document-library/rtehtmlarea/Tutorial-79/
    137. #mod_gzip_item_exclude file \.css$
    138. #mod_gzip_item_exclude file \.png$
    139. #mod_gzip_item_exclude file \.gif$
    140. #mod_gzip_item_exclude file \.jpg$
    141. #mod_gzip_item_exclude file \.jpeg$
    142. #mod_gzip_item_exclude file \.js$
    143.  
    144. ### End: Miscellaneous ###
    145.  
    146. # 404handling
    147. ErrorDocument 404 /404.htm
    148. ErrorDocument 500 /404.htm

    momentan ist unsere seite beim aufruf ohne http://www. garnicht erreichbar - woran liegt das?

    ich möchte das die seite, wenn sie ohne http://www. aufgerufen wird auf http://www. weitergeleitet wird.

    wenn ich das:

    1. # Doppelten Content vermeiden
    2. # RewriteCond %{HTTP_HOST} ^bag-stage\.de$ [NC]
    3. # RewriteRule ^(.*)$ www.bag-stage.de/$1 [R=301,L]

    aktiviere geht es leider auch nicht...

    zudem ist unsere seite - http://www.bag-stage.de auch über die Account URL: xxxxxx.mittwaldserver.info erreichbar - ist das nicht auch suboptimal wegen dem thema "doppelter content"?

    danke für eure antworten...

  • SomehowLost SomehowLo...
    Jedi-Meister
    0 x
    278 Beiträge
    0 Hilfreiche Beiträge
    15. 02. 2011, 10:27

    Hallo,

    richte auf deiner Root-Seite einen Domain-Record ein mit dem Inhalt:

    meinedomain.de
    -> Weiterleitung auf http://www.meinedomain.de (oder http://www.meinedomain.de)

    danach sollte es gehen.

    Viele Grüße,
    Andreas

    [url=http://www.andreas-hoffmeyer.de/]Andreas Hoffmeyer - Websites & mehr...[/url]
    [url=http://typo3-4-newbies.blogspot.de/]TYPO3 für Einsteiger: typo3-4-newbies.blogspot.de[/url]

  • bagstage bagstage
    T3PO
    0 x
    17 Beiträge
    0 Hilfreiche Beiträge
    01. 03. 2011, 15:07

    Hallo,

    habe jetzt die Startseite definiert via "Als Anfang der Website benutzen". Unter Linkziel habe ich "http://www.bag-stage.de" eingetragen. Wenn ich jetzt

    RewriteCond %{HTTP_HOST} ^bag-stage\.de$ [NC]RewriteRule ^(.*)$ http://www.bag-stage.de/$1 [R=301,L]

    in der .htaccess aktiviere geht es leider immer noch nicht. :(

    Und unter xxx.mittwaldserver.info ist die Seite auch immer noch aufrufbar ;)

  • mhworx mhworx
    Sternenflotten-Admiral
    0 x
    229 Beiträge
    0 Hilfreiche Beiträge
    01. 03. 2011, 15:57

    Hi !

    ah mittwaldserver...

    ganz einfach ...
    im Loginbereich (bei mittwald):

    die http://www.domain auf das typo3 verzeichnis zeigen lassen...
    die ohne umleiten auf die http://www.xxx.de

    ganz einfach

    gruß
    Michael

  • bagstage bagstage
    T3PO
    0 x
    17 Beiträge
    0 Hilfreiche Beiträge
    03. 03. 2011, 13:52

    [quote="mhworx"]
    Hi !

    ah mittwaldserver...

    ganz einfach ...
    im Loginbereich (bei mittwald):

    die http://www.domain auf das typo3 verzeichnis zeigen lassen...
    die ohne umleiten auf die http://www.xxx.de

    ganz einfach

    gruß
    Michael
    [/quote]

    hab ich gemacht - geht leider immer noch nicht.... :(

  • 1