Автор Тема: Проблема с .htaccess  (Прочитано 19415 раз)

vsesvit

  • Гость
Re: Проблема с .htaccess
« Ответ #15 : Января 17, 2012, 06:28:58 pm »
У меня та же проблема не знает кто, как исправить файл .htaccess и еще когда начинаю установку русские буквы отображаются ромбами ���������� � �������

[вложение удалено администратором]

vsesvit

  • Гость
Re: Проблема с .htaccess
« Ответ #16 : Января 18, 2012, 08:12:56 pm »
Ну ладно это такое не существенное
А вот проблема с .htaccess остаётся

Сайт не работает если в корне находится .htaccess.

Пишет  - Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator,  and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.


При удалении .htaccess из корня сайта, сайт открывается но ссылки не работают -
пишет -
Not Found
The requested URL /product/toyota-land-cruiser-100-1/ was not found on this server.
« Последнее редактирование: Января 18, 2012, 08:15:43 pm от vsesvit »

Оффлайн www.po.kiev.ua

  • Пользователь
  • **
  • Сообщений: 24
    • Просмотр профиля
    • Интернет-магазин PO.kiev.ua
Re: Проблема с .htaccess
« Ответ #17 : Января 18, 2012, 08:42:55 pm »
Сайт не работает если в корне находится .htaccess.
Пишет  - Internal Server Error
Это зависит от настроек хостинга. Если, например, php работает как fastcgi, то в .htaccess не допускается использование php-флагов php_flag. В некоторых конфигурациях и другие опции нельзя использовать, например Options -Indexes
Если не разберетесь - пишите содержимое вашего .htaccess
-
Интернет-магазин http://webasyst.shop-script.org Продаем скрипты WebAsyst. Официальные реселлеры с 2006 г.
Всегда хорошая цена и скидки.

vsesvit

  • Гость
Re: Проблема с .htaccess
« Ответ #18 : Января 19, 2012, 03:35:42 am »
Спасибо всем большое разобрался сам ;D
Немного переделал файл и всё заработало :) и бесплатно!
Кому нужно:

[spoiler] <Files ".htaccess">
deny from all
</Files>

RewriteEngine On
RewriteBase /

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://ВАШСАЙТ.info/ [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://ВАШСАЙТ.info/ [R=301,L]

RewriteCond %{HTTP_HOST} ^www.ВАШСАЙТ.info[NC]
RewriteRule ^(.*)$ http://ВАШСАЙТ.info/$1 [L,R=301]


RewriteRule ^index.html? index.php
RewriteRule ^admin.html? admin.php
RewriteRule ^rss.html? rss.php
RewriteRule ^redirect.html? redirect.php
ErrorDocument 404 /404.html
AddDefaultCharset windows-1251
########################################

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

#copress js and css
        RewriteRule core/js/(.*)\.js$ core/jscss.php [L]
        RewriteRule css/(.*).css$ core/jscss.php [L]


#payment
   RewriteRule payment/$ index.php?payment [L]

#about url's
   RewriteRule ^catalog/(.*)/about/$ index.php?about&category=$1/ [L]
   RewriteRule ^brand/(.*)/about/$ index.php?about&brands=$1/ [L]

#catalog url's
   RewriteRule ^catalog/(.*)$ index.php?catalog_hurl=$1 [L]
   RewriteRule ^product/(.*)$ index.php?product_hurl=$1 [L]
   RewriteRule ^news/(.*)$ index.php?news&news=$1 [L]
   RewriteRule ^pages/(.*)$ index.php?pages&pages=$1 [L]
   RewriteRule ^tags/(.*)$ index.php?tags_hurl=$1 [L]
   RewriteRule ^brand/(.*)/(.*) index.php?brand=$1/$2 [L]

#sort url's
   RewriteRule (.*)/(.*)/&sort=(.*)&order=(.*)$ index.php?$1_hurl=$2&sort=$3&order=$4 [L]

#offset url's
   #RewriteRule offset/(.*)/&sort=(.*)&order=(.*)$ index.php?searchstring=$1&sort=$2&order=$3 [L]
   RewriteRule (.*)/(.*)/&offset=(.*)$ index.php?$1_hurl=$2&offset=$3 [L]
   RewriteRule (.*)/(.*)/&show_all=yes$ index.php?$1_hurl=$2&show_all=yes [L]

#lang url's
   RewriteRule ru/$ index.php?new_language=0 [L]
   RewriteRule en/$ index.php?new_language=1 [L]

#information url's
   RewriteRule info/(.*)$ index.php?aux_pages=$1 [L]
   RewriteRule contact/&send_result=(.*)$ index.php?contact&send_result=$1 [L]
   RewriteRule contact/$ index.php?contact [L]
   RewriteRule service/$ index.php?aux_page=aux2 [L]
   RewriteRule pricelist/([0-9]*)/$ index.php?show_price=$1 [L]
   RewriteRule pricelist/$ index.php?show_price=yes [L]
   RewriteRule ^price.xls$ core/core_xls.php [L]
   RewriteRule feed.xml$ core/core_rss.php [L]
   RewriteRule ^about/$ index.php?aux_page=aux1 [L]
   RewriteRule grafik/$ index.php?aux_page=aux1 [L]
   RewriteRule adress/$ index.php?aux_page=aux1 [L]
   RewriteRule sitemap\.xml$ core/sitemap.php [L]
   RewriteRule sitemap/$ index.php?sitemap [L]

#administration url's
   RewriteRule admin$ admin.php [L]
   RewriteRule admin/$ admin.php [L]

#cart url's
   RewriteRule add2cart/(.*)$ index.php?shopping_cart&add2cart=$1 [L]
   RewriteRule cart/$ index.php?shopping_cart=yes [L]
   RewriteRule cart/&remove=(.*)$ index.php?shopping_cart=yes&remove=$1 [L]
   RewriteRule cart/&clear$ index.php?shopping_cart=yes&clear_cart=yes [L]
   RewriteRule cart/order/$ index.php?order_custinfo=yes [L]
   RewriteRule cart/order_placed/$ index.php?order_placement_result=1 [L]
   RewriteRule printorder/$ core/core_printorder.php [L]
   RewriteRule pd4/$ core/print_pd4.php [L]

#yandex url's
   RewriteRule yandex\.(xml|yml)$ core/core_yml.php [L]
        RewriteRule metamarket\.xml$ core/core_metamarket.php [L]
       

#search_expanded url's
    RewriteRule search_expanded/ index.php?search_expanded=1 [L]

#watermark
    #RewriteRule ^(products_pictures|products_thumb|userfiles)/(.*\.(gif|jpg|jpeg|png))  core/watermark.php?dir=$1&img_path=$2 [L] # All image
    #RewriteRule ^(products_pictures)/(.*\.(gif|jpg|jpeg|png))  core/watermark.php?dir=$1&img_path=$2 [L] # All products_pictures
    #RewriteRule ^(products_pictures)/(.*-B\.(gif|jpg|jpeg|png))  core/watermark.php?dir=$1&img_path=$2 [L] # only big products_pictures
    #RewriteRule ^(products_pictures)/(.*-H\.(gif|jpg|jpeg|png))  core/watermark.php?dir=$1&img_path=$2 [L] # only smal products_pictures 
    #RewriteRule ^(products_thumb)/(.*\.(gif|jpg|jpeg|png))  core/watermark.php?dir=$1&img_path=$2 [L] # All products_thumb 


#errors
   RewriteRule 404/$ core/core_404.php [L]

   ErrorDocument 403 http://install/404/
   ErrorDocument 404 http://install/404/


[/spoiler]

Оффлайн www.po.kiev.ua

  • Пользователь
  • **
  • Сообщений: 24
    • Просмотр профиля
    • Интернет-магазин PO.kiev.ua
Re: Проблема с .htaccess
« Ответ #19 : Января 20, 2012, 01:19:18 am »
Так что конкретно убрали или заменили?
Чтобы не сравнивать и не копаться в коде (тем более не все осилят).
-
Интернет-магазин http://webasyst.shop-script.org Продаем скрипты WebAsyst. Официальные реселлеры с 2006 г.
Всегда хорошая цена и скидки.

vsesvit

  • Гость
Re: Проблема с .htaccess
« Ответ #20 : Января 20, 2012, 02:19:22 pm »
Так что конкретно убрали или заменили?
Чтобы не сравнивать и не копаться в коде (тем более не все осилят).
Убрал:
[spoiler]#config
   DirectoryIndex index.php
   AddDefaultCharset windows-1251
   AddCharset windows-1251 .php
        Options -Indexes

#rewrite url's
   RewriteEngine On
   RewriteBase     /[/spoiler]

Добавил:

[spoiler]<Files ".htaccess">
deny from all
</Files>

RewriteEngine On
RewriteBase /

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://ВАШСАЙТ.info/ [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://ВАШСАЙТ.info/ [R=301,L]

RewriteCond %{HTTP_HOST} ^www.ВАШСАЙТ.info[NC]
RewriteRule ^(.*)$ http://ВАШСАЙТ.info/$1 [L,R=301]


RewriteRule ^index.html? index.php
RewriteRule ^admin.html? admin.php
RewriteRule ^rss.html? rss.php
RewriteRule ^redirect.html? redirect.php
ErrorDocument 404 /404.html
AddDefaultCharset windows-1251
########################################[/spoiler]

Оффлайн www.po.kiev.ua

  • Пользователь
  • **
  • Сообщений: 24
    • Просмотр профиля
    • Интернет-магазин PO.kiev.ua
Re: Проблема с .htaccess
« Ответ #21 : Января 20, 2012, 02:39:51 pm »
Возможно, достаточно было убрать только Options -Indexes  ?
-
Интернет-магазин http://webasyst.shop-script.org Продаем скрипты WebAsyst. Официальные реселлеры с 2006 г.
Всегда хорошая цена и скидки.