30-09-2012, 21:50
Oszaleję...
Mam dość rozbudowany serwis postawiony na Joomli. Próbuje zmienić domenę ze stara.pl na nowa.pl. Obie na tym samym serwerze w home.pl
Poczyniłem następujące kroki:
1. Przekierowałem nową domenę na katalog, w którym jest witryna ze starej domeny ( wciąż aktywna)
2. Zrobiłem 301 w .htaccess w folderze zawierającym witrynę, ze starej domeny na nową. Wygląda on tak
##
# @version $Id: htaccess.txt 21064 2011-04-03 22:12:19Z dextercowley $
# @package Joomla
# @copyright Copyright © 2005 - 2010 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##
#####################################################
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################
## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks
#
# mod_rewrite in use
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.hipotekadlaciebie.pl [nc]
RewriteRule ^(.*)$ http://www.tani-kredyt-hipoteczny.pl/$1 [r=301,L]
RewriteCond %{HTTP_HOST} ^hipotekadlaciebie.pl$
RewriteRule ^(.*) http://www.hipotekadlaciebie.pl/$1 [QSA,L,R=301]
Rewriterule ^(.*)\/index\.htm$ $1 [R=301,L]
Rewriterule ^index\.htm$ / [R=301,L]
rewritecond %{REQUEST_URI} ^/opis-dzialalnosci-firmy/kredyty-i-ubezpieczenia-w-lublinie$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/niezbedne-informacje/o-firmie-hdc [r=301,L]
rewritecond %{REQUEST_URI} ^/opis-dzialalnosci-firmy/kredyt-hipoteczny-gotowkowy-lub-ubezpieczenie-dla-ciebie$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/kredyt-dla-osoby-fizycznej [r=301,L]
rewritecond %{REQUEST_URI} ^/opis-dzialalnosci-firmy/oferta-kredytow-dla-firm$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/kredyt-dla-firmy [r=301,L]
rewritecond %{REQUEST_URI} ^/wiedza/blog$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe [r=301,L]
rewritecond %{REQUEST_URI} ^/oferta-nieruchomoci.html$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/nieruchomosci [r=301,L]
rewritecond %{REQUEST_URI} ^/opis-dzialalnosci-firmy/dane-kontaktowe-hdc-lublin$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/niezbedne-informacje/dane-kontaktowe [r=301,L]
rewritecond %{REQUEST_URI} ^/sprawdz-wysokosc-raty-kredytu$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/oblicz-swoja-zdolnosc-kredytowa [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/kredy-preferencyjny-rodzina-na-swoim-dla-kogo$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/rodzina-na-swoim [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/kredyt-z-doplatami-rodzina-na-swoim-na-jaki-cel$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/rodzina-na-swoim [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/kredyt-z-doplatami-rodzina-na-swoim-zasady-stosowania-doplat$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/rodzina-na-swoim [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/rodzina-na-swoim-warunki-do-spelnienia$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/rodzina-na-swoim [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/najlepszy-kredyt-hipoteczny-wg-open-finance$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/najlepsze-oferty-kredytowe-na-rynku [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/najlepszy-kredyt-hipoteczny-w-eur$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/najlepsze-oferty-kredytowe-na-rynku [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/najlepszy-kredyt-hipoteczny-w-chf$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/najlepsze-oferty-kredytowe-na-rynku [r=301,L]
rewritecond %{REQUEST_URI} ^/publikacje-prasowe/kupno-czy-wynajem$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe/44-kupno-czy-wynajem [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/jak-obnizyc-rate-kredytu-mieszkaniowego-nawet-o-300zl$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe/45-splacasz-kredyt-terminowo-negocjuj-marze [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/stary-dlug-moze-wrocic-jak-bumerang$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/poradnik/porady-prawne [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/obniz-rate-kredytu-nawet-o-200-zl$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe/43-odpis-z-ksiegi-wieczystej-obnizy-rate [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/dlaczego-warto-wziac-kredyt-we-frankach$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe/4-dlaczego-warto-wziasc-kredyt-we-franku [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/czy-warto-przewalutowac-kredyt-we-frankach$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe/3-czy-warto-przewalutowac-kredyt-we-frankach [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/naprawde-najtanszy-kredyt-hipoteczny-jakie-sa-dodatkowe-koszty-kredytu$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/najlepsze-oferty-kredytowe-na-rynku [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/kredyt-z-doplatami-rzadowymi-rodzina-na-swoim$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/rodzina-na-swoim [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/najlepszy-kredyt-hipoteczny-w-pln$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/najlepsze-oferty-kredytowe-na-rynku [r=301,L]
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode data within the URL
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
########## End - Rewrite rules to block out some common exploits
########## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
########## End - Custom redirects
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)
# RewriteBase /
########## Begin - Joomla! core SEF Section
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
########## End - Joomla! core SEF Section
3. Wyczyściłem cache przeglądarki i dnsów
No i huk: po wejściu na adres starej witryny dostaję błąd 310
W pasku przeglądarki pojawia się wprawdzie nowy adres ale wyświetla błąd 310.
Korzystam z przeglądarek Maxthon i Firefox, na obu to samo
Upraszam o pomoc bo pojęcia nie mam. Przejrzałem całego googla polskiego i angielskiego, ale nic mi to nie dało. Dowidziałem się , że jest to pętla przekierowań, ale nie wiem co dalej z tym fantem.
Mam dość rozbudowany serwis postawiony na Joomli. Próbuje zmienić domenę ze stara.pl na nowa.pl. Obie na tym samym serwerze w home.pl
Poczyniłem następujące kroki:
1. Przekierowałem nową domenę na katalog, w którym jest witryna ze starej domeny ( wciąż aktywna)
2. Zrobiłem 301 w .htaccess w folderze zawierającym witrynę, ze starej domeny na nową. Wygląda on tak
##
# @version $Id: htaccess.txt 21064 2011-04-03 22:12:19Z dextercowley $
# @package Joomla
# @copyright Copyright © 2005 - 2010 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##
#####################################################
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################
## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks
#
# mod_rewrite in use
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.hipotekadlaciebie.pl [nc]
RewriteRule ^(.*)$ http://www.tani-kredyt-hipoteczny.pl/$1 [r=301,L]
RewriteCond %{HTTP_HOST} ^hipotekadlaciebie.pl$
RewriteRule ^(.*) http://www.hipotekadlaciebie.pl/$1 [QSA,L,R=301]
Rewriterule ^(.*)\/index\.htm$ $1 [R=301,L]
Rewriterule ^index\.htm$ / [R=301,L]
rewritecond %{REQUEST_URI} ^/opis-dzialalnosci-firmy/kredyty-i-ubezpieczenia-w-lublinie$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/niezbedne-informacje/o-firmie-hdc [r=301,L]
rewritecond %{REQUEST_URI} ^/opis-dzialalnosci-firmy/kredyt-hipoteczny-gotowkowy-lub-ubezpieczenie-dla-ciebie$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/kredyt-dla-osoby-fizycznej [r=301,L]
rewritecond %{REQUEST_URI} ^/opis-dzialalnosci-firmy/oferta-kredytow-dla-firm$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/kredyt-dla-firmy [r=301,L]
rewritecond %{REQUEST_URI} ^/wiedza/blog$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe [r=301,L]
rewritecond %{REQUEST_URI} ^/oferta-nieruchomoci.html$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/nieruchomosci [r=301,L]
rewritecond %{REQUEST_URI} ^/opis-dzialalnosci-firmy/dane-kontaktowe-hdc-lublin$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/niezbedne-informacje/dane-kontaktowe [r=301,L]
rewritecond %{REQUEST_URI} ^/sprawdz-wysokosc-raty-kredytu$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/oblicz-swoja-zdolnosc-kredytowa [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/kredy-preferencyjny-rodzina-na-swoim-dla-kogo$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/rodzina-na-swoim [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/kredyt-z-doplatami-rodzina-na-swoim-na-jaki-cel$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/rodzina-na-swoim [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/kredyt-z-doplatami-rodzina-na-swoim-zasady-stosowania-doplat$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/rodzina-na-swoim [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/rodzina-na-swoim-warunki-do-spelnienia$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/rodzina-na-swoim [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/najlepszy-kredyt-hipoteczny-wg-open-finance$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/najlepsze-oferty-kredytowe-na-rynku [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/najlepszy-kredyt-hipoteczny-w-eur$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/najlepsze-oferty-kredytowe-na-rynku [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/najlepszy-kredyt-hipoteczny-w-chf$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/najlepsze-oferty-kredytowe-na-rynku [r=301,L]
rewritecond %{REQUEST_URI} ^/publikacje-prasowe/kupno-czy-wynajem$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe/44-kupno-czy-wynajem [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/jak-obnizyc-rate-kredytu-mieszkaniowego-nawet-o-300zl$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe/45-splacasz-kredyt-terminowo-negocjuj-marze [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/stary-dlug-moze-wrocic-jak-bumerang$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/poradnik/porady-prawne [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/obniz-rate-kredytu-nawet-o-200-zl$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe/43-odpis-z-ksiegi-wieczystej-obnizy-rate [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/dlaczego-warto-wziac-kredyt-we-frankach$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe/4-dlaczego-warto-wziasc-kredyt-we-franku [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/czy-warto-przewalutowac-kredyt-we-frankach$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/aktualnosci-kredytowo-finansowe/3-czy-warto-przewalutowac-kredyt-we-frankach [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/naprawde-najtanszy-kredyt-hipoteczny-jakie-sa-dodatkowe-koszty-kredytu$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/najlepsze-oferty-kredytowe-na-rynku [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/kredyt-z-doplatami-rzadowymi-rodzina-na-swoim$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/rodzina-na-swoim [r=301,L]
rewritecond %{REQUEST_URI} ^/artykuly-o-kredytach/najlepszy-kredyt-hipoteczny-w-pln$ [nc]
rewriterule ^(.*)$ http://www.hipotekadlaciebie.pl/kredyty/najlepsze-oferty-kredytowe-na-rynku [r=301,L]
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode data within the URL
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
########## End - Rewrite rules to block out some common exploits
########## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
########## End - Custom redirects
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)
# RewriteBase /
########## Begin - Joomla! core SEF Section
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
########## End - Joomla! core SEF Section
3. Wyczyściłem cache przeglądarki i dnsów
No i huk: po wejściu na adres starej witryny dostaję błąd 310
W pasku przeglądarki pojawia się wprawdzie nowy adres ale wyświetla błąd 310.
Korzystam z przeglądarek Maxthon i Firefox, na obu to samo
Upraszam o pomoc bo pojęcia nie mam. Przejrzałem całego googla polskiego i angielskiego, ale nic mi to nie dało. Dowidziałem się , że jest to pętla przekierowań, ale nie wiem co dalej z tym fantem.