0 Members and 1 Guest are viewing this topic.
http://www.online.pl/online.pl.0fake/index.php
File not found.
A. Kloxo-MR: 6.5.0.f-2013031812B. OS: CentOS release 5.9 (Final) x86_64C. Apps: 1. MySQL: MariaDB-server-10.0.2-1 2. PHP: php-5.4.15-1.el5.remi 3. Httpd: httpd-2.2.24-1.el5 4. Lighttpd: --uninstalled-- 5. Nginx: nginx-1.4.1-11.el5.art 6. Qmail: qmail-toaster-1.03-1.3.22.mr.el5 7. Dns: djbdns-1.05-5D. Php-type (for Httpd/proxy): php-fpm_eventE. Memory: total used free shared buffers cached Mem: 32171 31409 761 0 1646 5361 -/+ buffers/cache: 24401 7769 Swap: 2047 151 1896
Is A or cname record already exist in dns setting?
I mean 'A record' or 'CName record' for 'www'.
RewriteEngine On RewriteCond %{HTTP_HOST} ^online.pl$ [NC] RewriteRule ^(.*)$ http://www.online.pl$1 [R=301,L]
RewriteEngine OnRewriteCond %{HTTP_HOST} !^www.RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
It adds:Code: [Select]RewriteEngine On RewriteCond %{HTTP_HOST} ^online.pl$ [NC] RewriteRule ^(.*)$ http://www.online.pl$1 [R=301,L]While there should be just - this one works well:Code: [Select]RewriteEngine OnRewriteCond %{HTTP_HOST} !^www.RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Quote from: "Spacedust"It adds:Code: [Select]RewriteEngine On RewriteCond %{HTTP_HOST} ^online.pl$ [NC] RewriteRule ^(.*)$ http://www.online.pl$1 [R=301,L]While there should be just - this one works well:Code: [Select]RewriteEngine OnRewriteCond %{HTTP_HOST} !^www.RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]Is nginx/apache think that .pl as perl extension rather than top/country-level domain?.
Your code:Code: [Select]RewriteEngine OnRewriteCond %{HTTP_HOST} !^www.RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]may problem for wildcards domain (wordpress multisite need wildcards setting for dns).
This 'RewriteCond %{HTTP_HOST} !^www.' mean all subdomain not the same as 'www' will be redirect to 'www'.That mean 'domain.com', 'wp1.domain.com' and others will be redirect to 'www.domain.com'.
RewriteCond %{HTTP_HOST} ^example.com$ [NC]RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Page created in 0.032 seconds with 18 queries.