Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

.htaccess Redirect problem


Go to End
Reply


10 Posts   3122 Views

Avatar
banal

Community Member, 901 Posts

7 November 2009 at 9:22am

I think there's a loop in your redirection. The RewriteCond matches domain.de and then rewrites to domain.de.. thus it will always match and always redirect. You should just match the first level and rewrite www.domain.de to www.domain.de/de/ and nothing more?

Something like this should work and matches www.domain.de and domain.de

RewriteCond %{HTTP_HOST} ^(www\.)?domain\.de$ [NC]
RewriteRule ^/?$ http://www.domain.de/de/ [R=301,NC,L]

Avatar
snaip

Community Member, 180 Posts

27 November 2009 at 2:20am

perfect !!
you are my htaccess boss :]

Go to Top