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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

.htaccess Redirect problem


Go to End


10 Posts   4882 Views

Avatar
bummzack

Community Member, 904 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, 181 Posts

27 November 2009 at 2:20am

perfect !!
you are my htaccess boss :]

Go to Top