Jump to content
Sign in to follow this  
pinkovskiy

404 ошибка для сайта с WWW

Recommended Posts

Помогите, пожалуйста решить проблему. Сайт отлично работает без WWW, но с www выдает 404 ошибку 

 

http://www.fisherway.com.ua/ 

 

Нужно чтобы был 301 редирект с http://WWW.fisherway.com.ua на  http://fisherway.com.ua

 

Все возможное, что смог нагуглить по редиректам в .htaccess перепробовал - не получается 

Options +FollowSymlinks

# Запретить листинг директорий
#Options -Indexes

# Закрыть доступ к файлам шаблонов
#<FilesMatch "\.(tpl|ini|log|txt)">
#Order deny,allow
#Deny from all
#</FilesMatch>

<Files robots.txt>
Allow from all
</Files>

# Необходимо для ЧПУ.
RewriteEngine On

#редирект с www
RewriteCond %{HTTP_HOST}	^www\.(.*)	[NC]
RewriteRule ^(.*)$ http://%1/$1	[R=301,L]

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling, then restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

    <IfModule mod_expires.c>
        # set expires 1 week
        <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|js|css)$">
        Header set Cache-Control "max-age=290304000, public"
        Header unset Last-Modified
        </FilesMatch>

Share this post


Link to post
Share on other sites

А он точно доступен по www

RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L,QSA]

Share this post


Link to post
Share on other sites

Имеете ввиду, что что-то с NS? Проверил, все норм.

Share this post


Link to post
Share on other sites

В конфигах apache и, если есть, nginx, алиасы прописаны?

Share this post


Link to post
Share on other sites

я спрошу по другому

 

Если удалить .htaccess сайт будет доступен с www?

Share this post


Link to post
Share on other sites

Большое спасибо за совет, удалил .htaccess, сайт также недоступен. Значит дело, где-то в серверной части. Куда смотреть, не подскажете?

Share this post


Link to post
Share on other sites

К хостеру.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.