Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Следующая версия
Предыдущая версия
hosting:cms:prestashop:htaccess [2019/07/31 16:33]
karlov создано
hosting:cms:prestashop:htaccess [2020/06/03 17:32]
karlov
Строка 1: Строка 1:
-====== Стандартные .htaccess для PrestaShop ======+====== 2.13.8.9. Стандартные .htaccess для PrestaShop ======
  
-Содержимое стандартных ''.htaccess'' для PrestaShop: +Пример содержимого стандартных [[hosting:htaccess|.htaccess]] для PrestaShop (генерируется автоматически при установке)
-  * Из [[hosting:my-sites:site-settings:root-dir|корневого каталога]] сайта:<code apache .htaccess [enable_line_numbers="true"]>+  * Из [[hosting:my-sites:site-settings:root-dir|корневого каталога]] сайта:<code apache [enable_line_numbers="true"]>
 # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
 # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
Строка 15: Строка 15:
  
  
-#Domain: ps17.rndm.gq+#Domain: www.example.com
 RewriteRule . - [E=REWRITEBASE:/] RewriteRule . - [E=REWRITEBASE:/]
 RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
  
 # Images # Images
-RewriteCond %{HTTP_HOST} ^ps17.rndm.gq$+RewriteCond %{HTTP_HOST} ^www.example.com$
 RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
-RewriteCond %{HTTP_HOST} ^ps17.rndm.gq$+RewriteCond %{HTTP_HOST} ^www.example.com$
 RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
-RewriteCond %{HTTP_HOST} ^ps17.rndm.gq$+RewriteCond %{HTTP_HOST} ^www.example.com$
 RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
-RewriteCond %{HTTP_HOST} ^ps17.rndm.gq$+RewriteCond %{HTTP_HOST} ^www.example.com$
 RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
-RewriteCond %{HTTP_HOST} ^ps17.rndm.gq$+RewriteCond %{HTTP_HOST} ^www.example.com$
 RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
-RewriteCond %{HTTP_HOST} ^ps17.rndm.gq$+RewriteCond %{HTTP_HOST} ^www.example.com$
 RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
-RewriteCond %{HTTP_HOST} ^ps17.rndm.gq$+RewriteCond %{HTTP_HOST} ^www.example.com$
 RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
-RewriteCond %{HTTP_HOST} ^ps17.rndm.gq$+RewriteCond %{HTTP_HOST} ^www.example.com$
 RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
-RewriteCond %{HTTP_HOST} ^ps17.rndm.gq$+RewriteCond %{HTTP_HOST} ^www.example.com$
 RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
-RewriteCond %{HTTP_HOST} ^ps17.rndm.gq$+RewriteCond %{HTTP_HOST} ^www.example.com$
 RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
 # AlphaImageLoader for IE and fancybox # AlphaImageLoader for IE and fancybox
Строка 67: Строка 67:
 # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
 </code> </code>
-  * Из подкаталога [[hosting:cms:prestashop:admin|админ-панели]]:<code apache .htaccess [enable_line_numbers="true",highlight_lines_extra="17"]>+  * Из подкаталога [[hosting:cms:prestashop:admin|админ-панели]] ([[github>PrestaShop/PrestaShop/blob/develop/admin-dev/.htaccess|GitHub]]):<code apache [enable_line_numbers="true"]>
 # Use the front controller as index file. It serves as a fallback solution when # Use the front controller as index file. It serves as a fallback solution when
 # every other rewrite/redirect fails (e.g. in an aliased environment without # every other rewrite/redirect fails (e.g. in an aliased environment without
Строка 84: Строка 84:
 # to the front controller "/app.php" but be rewritten to "/app.php/app". # to the front controller "/app.php" but be rewritten to "/app.php/app".
 <IfModule mod_negotiation.c> <IfModule mod_negotiation.c>
-#    Options -MultiViews+    Options -MultiViews
 </IfModule> </IfModule>
  
Строка 146: Строка 146:
 </IfModule> </IfModule>
 </code> </code>
- 
-Директива в строке 17 закомментирована для [[hosting:htaccess:unsupported-options|совместимости]] с нашим хостингом. 
- 
-===== Другие статьи ===== 
- 
-{{indexmenu>.#1|nsort tsort}} 
  • hosting/cms/prestashop/htaccess.txt
  • Последнее изменение: 2020/06/05 13:47
  • (внешнее изменение)