Koozali.org: home of the SME Server
Contribs.org Forums => Koozali SME Server 10.x => Topic started by: dadou on July 18, 2023, 11:59:35 AM
-
Hello,
Hope you are all well ! Little question probably my mistake, but I don't get it. I am on 10.1.
I activated the AllowOverride=All on the ibay.
The .htaccess file is now well interpreted.
I try to redirect traffic of domain.com to www.domain.com :
Options +FollowSymLinks -Indexes
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
But I get an Internal Server Error and in the Logs :
/.htaccess: Either all Options must start with + or -, or no Option may.
When I only leave first line in the htaccess it's fine :
Options +FollowSymLinks -Indexes
But as soon as I put the rewrite conditions it's in error.
An idea ?
Thanks
Dadou
-
what editor do you uses ?
-
Good guess. I didn't thought about that.
I use Notepad++ on Windows, and the \r is wrong (or probably LF & CRLF pb).
When I edit with vi on command line it's not ok. I changed it through vi and now it's fine.
Thanks Jean-Philippe. Sorry not to have thought about it.
Dadou
-
Damn, notepad++ is all I use or try and use..need to be a little careful, nano for cli tasks
-
good news !
notepad++ was my best editor when i was under windows years back. you should be able to configure the line separator to fit. Running it with wine under linux is so slow to start that it is a no go.
I miss its versatility and numerous plugins.