Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: ElFroggio on October 20, 2008, 05:41:40 AM
-
Hi,
I have created a new iBay. My website works but the rewrite does not: I want all request to be redirected to www.
In .htaccess I have:
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
then I did:
db accounts setprop ibfoto-biz.dp6 AllowOverride All
expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/rc7.d/S86httpd-e-smith restart
chown -R www:www *
But the rewrite does not happens. How can I track down the problem?
Any suggestion will be appreciated
-
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
replace
'RewriteRule (.*)'
with
'RewriteRule ^(.*)'
[PostEdit: changed my mind;~)]
-
If that doesn't cut the mustard try cutting less corners.
Spell out the site in long hand ie drop the rewrite HOST:
RewriteCond %{HTTP_HOST} !^www\.myactualsite
RewriteRule ^(.*) http://www.myactualsite/$1 [R=301,L]
-
Just did and it still does not work. Here is the full listing:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.sritch\.com
RewriteRule ^(.*) http://www.sritch.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
This is for drupal.
Then I expanded it with:
db accounts setprop ibfoto-biz.dp6 AllowOverride All
expand-template /etc/httpd/conf/httpd.conf
chown -R www:www *
chown -R www:www .htaccess
I must be doing something wrong or missing something, but I don't see it. I have checked all the http log files and it shows no error.
Thanks
-
I've always used 'O'n... (uppercase O)
RewriteEngine On
Maybe you need some Options? eg
Options +FollowSymLinks -MultiViews
RewriteEngine On
I don't know drupal at all. Found Joomla! to be
hazardous/tedious enough to then try out drupal.
Now I just try to keep things down to plain old
handwritten PHP/html hoping I don't get too lost.
Best of luck;~)
-
Take a look at /etc/httpd/conf/httpd.conf and make sure the contents relating to your ibay make sense:
* allowoverride all
* executable content allowed in the folder you're expecting (default is <ibayname>/cgi-bin - where is your "index.php" located?)
-
Thanks for this post!