i had to move a website to a new subdomain. previously it was available at www.some-domain.com. it has now moved to http://shop.some-domain.com.
there are only some bits of the website which actually use clean urls, for example: http://shop.some-domain.com/en-GB/shop/accessories/Soft-Scarf
and exactly those URLs do not work anymore, i receive an error 404 when trying to open them. other parts of the website which do not use clean urls work fine.
the website files are located in the root folder (/)… the htaccess inside this folder looks like this:
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.some-domain.com [NC]
# i think this line is causing the problem:
RewriteRule ^(.*)$ http://www.some-domain.com/$1 [R=301,L]
ErrorDocument 404 /webEdition/redirectSEOurls.php
tried changing the URL in the line to shop.some-domain.com but it didn’t help
help is much appreciated, thanks
You’re correct about the error source. Just change the two occurrences of
wwwtoshop.The purpose of the
RewriteCondline and subsequentRewriteRulewas to force requests likehttp://some-domain.comto the canonical domainhttp://www.some-domain.com. You’ve now changed that toshop.some-domain.comand so it’s a simple matter of updating both the condition and the rewrite rule.