redirect to www
Posted by: erandi1993 (5.206.239.---)
Date: June 23, 2015 09:22PM

Hello my domain name is: filma-24.com ,also work with www.filma-24.com
but when people join with "filma-24.com , i want to redirect them to: www.filma-24.com

i tried using rewrite on .htaccess:

RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule ^(.*) [www.domain.com] [R=301,L]

but dont work ,when load site said: This webpage has a redirect loop

ERR_TOO_MANY_REDIRECTS



Edited 1 time(s). Last edit at 06/23/2015 09:33PM by erandi1993.

Options: ReplyQuote
Re: redirect to www
Posted by: RiggsFolly (---.as43234.net)
Date: June 23, 2015 11:06PM

Try this

RewriteEngine On
RewriteCond %{HTTP_HOST} ^filma-24.com
RewriteRule (.*) [www.filma-24.com] [R=301,L]

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: redirect to www
Posted by: erandi1993 (5.206.239.---)
Date: June 23, 2015 11:34PM

this redirect me to: [filma-24.com]
and said: This webpage has a redirect loop

ERR_TOO_MANY_REDIRECTS

Options: ReplyQuote
Re: redirect to www
Posted by: RiggsFolly (---.as43234.net)
Date: June 24, 2015 12:34AM

Ah that got all messed up by the forum, it is doing protective things with some text

See if you can understand what I mean by this

RewriteCond %{HTTP_HOST} ^yoursite.co.uk
RewriteRule (.*) XXXX://www.yoursite.co.uk/$1 [R=301,L]

where XXXX = 'http'

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 06/28/2015 01:41PM by RiggsFolly.

Options: ReplyQuote
Re: redirect to www
Posted by: erandi1993 (5.206.239.---)
Date: June 24, 2015 01:17AM

again the same problem ,i have spoken with my DNS server ,they said that problem is on your web host ,which means on wamp server ,they said: "contact the web host to stop the redirect."
because i have setup redirect to www. ,but wamp server stop this redirect.



Edited 1 time(s). Last edit at 06/24/2015 03:54PM by erandi1993.

Options: ReplyQuote
Re: redirect to www
Posted by: www.sitepenalise.fr (---.fbx.proxad.net)
Date: June 28, 2015 01:36PM

You could try to alter your php script to detect the if the url starts with www. and do a 301 redirect with php if not ? ( it's kind of ugly, but that could do the trick for you maybe ? )

Options: ReplyQuote
Re: redirect to www
Posted by: RiggsFolly (---.as43234.net)
Date: June 28, 2015 01:50PM

Again

Your web hosting is either the company providing the PC and OS and environment you are running WAMPServer on !!!

OR

The person in control of the Apache web servers configuration.


You are in control of the Apache web servers configuration.

We are not your hosting company

I realise you are frustrated but this is due to the gap between your knowledge and the things you are trying to achieve.

Not everything is the responsibility of someone else to fix, or help you fix.

Documentation on How to Redirect from Your Root Domain to the WWW Subdomain

[httpd.apache.org]

[www.thesitewizard.com]

[stackoverflow.com]

[www.cyberciti.biz]

[webmasters.stackexchange.com]

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 06/28/2015 01:54PM by RiggsFolly.

Options: ReplyQuote
Re: redirect to www
Posted by: erandi1993 (5.206.239.---)
Date: June 28, 2015 05:10PM

looks like wordpress donw allow this ,because i connected another domain (now wordpress script) and allow me to www. ,but with wordpress not

Options: ReplyQuote
Re: redirect to www
Posted by: RiggsFolly (---.as43234.net)
Date: June 28, 2015 08:36PM

If you want a WordPress site to use a domain name of www.filma-24.com then you have to install it using www.filma-24.com and not filma-24.com

Its well publicised on the wordpress site. as is the way to change it from filma-24.com to www.filma-24.com

Again, lack of knowledge is causing you problems NOT WAMPServer

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-



Edited 1 time(s). Last edit at 06/29/2015 01:22AM by RiggsFolly.

Options: ReplyQuote


Sorry, only registered users may post in this forum.