Problems, need help? Have a tip or advice? Post it here.
11 posts Page 1 of 2
I just launched a new site and added 301 Redirects for old URL's. For some reason on my clonable template pages I get a 404 error even though the URL is correct. When I remove the redirects below the page loads as it should. Not sure where I am going wrong (the :

Code: Select all
RewriteRule ^salinas/(.*)$ http://www.sitename.com/location/salinas.html$1 [r=301,nc]
RewriteRule ^monterey/(.*)$ http://www.sitename.com/location/monterey.html$1 [r=301,nc]
Hi,

Perhaps it has got something to do with the location you have placed the new rules at?
Please try placing then at the location indicated below -
..
#DO NOT EDIT BELOW THIS

RewriteRule ^index.php$ "" [R=301,L,QSA]

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]

#####################

PLACE CUSTOM REDIRECT RULES HERE

#####################


#some-template.php
RewriteRule ^some-template$ "$0/" [R=301,L,QSA]
..
..

Hope it helps.
I placed it there and get this error:

ERR_CONTENT_DECODING_FAILED
Please make sure you are saving the .htaccess file as 'UTF8 without BOM' - your text editor will have this setting somewhere.
Back to a 404.
Following is a portion of a .htaccess containing similar redirects that I for sure know works fine -
Code: Select all
#DO NOT EDIT BELOW THIS

RewriteRule ^index.php$ "" [R=301,L,QSA]

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]

#####################

RewriteRule ^reviews/xyz.html http://www.site.com/news/xyz.html [R=301,L,QSA]

#####################

I suggest you try to use a similar format for your rules too (specifically the "[R=301,L,QSA]" part).
This way we can be sure that we are using something tried and tested.

If, unfortunately, even that does not work, I'm afraid there is nothing that I know of that could help you further with this issue.

Thanks.
It now redirects, but it has too many redirects. This is what it try to redirects to:

http://www.site.com/location/salinas.ht ... linas.html
Could you please PM me the access creds for your site please?
Let me take a look at the problem. Thanks.
Could this be the problem:

Code: Select all
<cms:if k_is_page="0" >
    <cms:pages limit='1' >
        <cms:redirect k_page_link />
    </cms:pages>
</cms:if>
The code you posted would redirect the visitor to the latest page of a clonable template when she happens to visit the list-view (or home-view) of the template.

I don't see anything problematic with it but you can try removing it and see if that helps.
11 posts Page 1 of 2