Стандартный .htaccess — различия между версиями
| Mad grant (обсуждение | вклад) | Whoa (обсуждение | вклад)  | ||
| Строка 2: | Строка 2: | ||
| <source lang="php"> | <source lang="php"> | ||
| + | ####################### UMI_CMS_HTACCESS_BEGIN ########################### | ||
| RewriteEngine On | RewriteEngine On | ||
| − | + | #To avoid manual css and js files recompile. Debug only. | |
| − | #To avoid manual css and js files recompile. Debug only.   | + | #RewriteRule (compressed\.js)|(compiled\.js)|(compiled\.css)|(compressed\.css)|(tiny_mce\.js) developerTools/preCompile.php [L] | 
| RewriteRule ^~/([0-9]+)$ tinyurl.php?id=$1 [L] | RewriteRule ^~/([0-9]+)$ tinyurl.php?id=$1 [L] | ||
| Строка 12: | Строка 13: | ||
| RewriteCond %{REQUEST_FILENAME} !-f | RewriteCond %{REQUEST_FILENAME} !-f | ||
| − | RewriteRule ^robots\.txt$  sbots.php?path=$1%{QUERY_STRING} [L] | + | RewriteRule ^robots\.txt$  sbots.php?path=$1&%{QUERY_STRING} [L] | 
| RewriteCond %{REQUEST_FILENAME} !-f | RewriteCond %{REQUEST_FILENAME} !-f | ||
| − | RewriteRule ^sitemap\.xml$  sitemap.php [L] | + | RewriteRule ^sitemap([0-9]*)\.xml$  sitemap.php?id=$1 [L] | 
| RewriteRule ^config\.ini$ / [L,R] | RewriteRule ^config\.ini$ / [L,R] | ||
| Строка 22: | Строка 23: | ||
| RewriteRule ^umi\.nginx\.conf$ / [L,R] | RewriteRule ^umi\.nginx\.conf$ / [L,R] | ||
| RewriteRule ^dbview\.php$ / [L,R] | RewriteRule ^dbview\.php$ / [L,R] | ||
| + | RewriteRule ^composer\.umi\.lock$ / [L,R] | ||
| + | RewriteRule ^composer\.umi\.json$ / [L,R] | ||
| RewriteCond %{REQUEST_URI} !^styles | RewriteCond %{REQUEST_URI} !^styles | ||
| Строка 29: | Строка 32: | ||
| RewriteCond %{REQUEST_URI} !\.js | RewriteCond %{REQUEST_URI} !\.js | ||
| RewriteCond %{REQUEST_URI} !^images | RewriteCond %{REQUEST_URI} !^images | ||
| + | RewriteCond %{REQUEST_URI} !^img | ||
| RewriteCond %{REQUEST_URI} !^webstat | RewriteCond %{REQUEST_URI} !^webstat | ||
| + | RewriteCond %{REQUEST_URI} !^fonts | ||
| + | RewriteCond %{REQUEST_URI} !\.ttf | ||
| + | RewriteCond %{REQUEST_URI} !\.woff | ||
| + | |||
| RewriteCond %{REQUEST_FILENAME} !-f | RewriteCond %{REQUEST_FILENAME} !-f | ||
| − | |||
| RewriteRule ^(.*)\.xml$ index.php?xmlMode=force&path=$1&%{QUERY_STRING} [L] | RewriteRule ^(.*)\.xml$ index.php?xmlMode=force&path=$1&%{QUERY_STRING} [L] | ||
| − | RewriteRule ^\/?(udata|upage|uobject|ufs|usel|ulang|utype|umess|uhttp):?(\/\/)?(.*)$ releaseStreams.php?scheme=$1&path=$3 | + | RewriteRule ^\/?(udata|upage|uobject|ufs|usel|ulang|utype|umess|uhttp):?(\/\/)?(.*)$ releaseStreams.php?scheme=$1&path=$3&%{QUERY_STRING} [L] | 
| + | RewriteCond %{REQUEST_FILENAME} !-f | ||
| RewriteRule ^(.*)\.json$ index.php?jsonMode=force&path=$1&%{QUERY_STRING} [L] | RewriteRule ^(.*)\.json$ index.php?jsonMode=force&path=$1&%{QUERY_STRING} [L] | ||
| Строка 44: | Строка 52: | ||
| RewriteCond %{REQUEST_URI} !\.js | RewriteCond %{REQUEST_URI} !\.js | ||
| RewriteCond %{REQUEST_URI} !^images | RewriteCond %{REQUEST_URI} !^images | ||
| + | RewriteCond %{REQUEST_URI} !^img | ||
| + | RewriteCond %{REQUEST_URI} !^fonts | ||
| + | RewriteCond %{REQUEST_URI} !\.ttf | ||
| + | RewriteCond %{REQUEST_URI} !\.woff | ||
| RewriteCond %{REQUEST_URI} !(\.ico|\.ICO)$ | RewriteCond %{REQUEST_URI} !(\.ico|\.ICO)$ | ||
| Строка 52: | Строка 64: | ||
| RewriteCond %{REQUEST_URI} !(\.css|\.CSS)$ | RewriteCond %{REQUEST_URI} !(\.css|\.CSS)$ | ||
| RewriteCond %{REQUEST_URI} !(\.js|\.JS)$ | RewriteCond %{REQUEST_URI} !(\.js|\.JS)$ | ||
| + | RewriteCond %{REQUEST_URI} !(\.ttf|\.TTF)$ | ||
| + | RewriteCond %{REQUEST_URI} !(\.woff|\.WOFF)$ | ||
| + | RewriteCond %{REQUEST_URI} !(\.svg|\.SVG)$ | ||
| RewriteCond %{REQUEST_FILENAME} !-f | RewriteCond %{REQUEST_FILENAME} !-f | ||
| Строка 65: | Строка 80: | ||
| RewriteCond %{REQUEST_URI} (\.css|\.CSS)$ | RewriteCond %{REQUEST_URI} (\.css|\.CSS)$ | ||
| RewriteCond %{REQUEST_URI} (\.js|\.JS)$ | RewriteCond %{REQUEST_URI} (\.js|\.JS)$ | ||
| + | RewriteCond %{REQUEST_URI} (\.ttf|\.TTF)$ | ||
| + | RewriteCond %{REQUEST_URI} (\.woff|\.WOFF)$ | ||
| + | RewriteCond %{REQUEST_URI} (\.svg|\.SVG)$ | ||
| RewriteCond %{REQUEST_FILENAME} !-f | RewriteCond %{REQUEST_FILENAME} !-f | ||
| Строка 72: | Строка 90: | ||
| <IfModule mod_mime.c> | <IfModule mod_mime.c> | ||
| − | + | AddType application/x-java-applet .class | |
| − | + | AddType text/x-component .htc | |
| </IfModule> | </IfModule> | ||
| <IfModule mod_security.c> | <IfModule mod_security.c> | ||
| − | + | SecFilterScanPOST Off | |
| </IfModule> | </IfModule> | ||
| <Files "whatsnew.txt"> | <Files "whatsnew.txt"> | ||
| − | + | Deny from all | |
| </Files> | </Files> | ||
| − | + | ||
| + | |||
| + | ######################## UMI_CMS_HTACCESS_END ############################ | ||
Версия 08:18, 23 мая 2018
<source lang="php">
- UMI_CMS_HTACCESS_BEGIN ###########################
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
RewriteEngine On
- To avoid manual css and js files recompile. Debug only.
- RewriteRule (compressed\.js)|(compiled\.js)|(compiled\.css)|(compressed\.css)|(tiny_mce\.js) developerTools/preCompile.php [L]
RewriteRule ^~/([0-9]+)$ tinyurl.php?id=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^(sys\-temp|cache|xmldb|static|packages)\/.*$ 500/ [L]
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^robots\.txt$ sbots.php?path=$1&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^sitemap([0-9]*)\.xml$ sitemap.php?id=$1 [L]
RewriteRule ^config\.ini$ / [L,R] RewriteRule ^install\.ini$ / [L,R] RewriteRule ^install\.log$ / [L,R] RewriteRule ^umi\.nginx\.conf$ / [L,R] RewriteRule ^dbview\.php$ / [L,R] RewriteRule ^composer\.umi\.lock$ / [L,R] RewriteRule ^composer\.umi\.json$ / [L,R]
RewriteCond %{REQUEST_URI} !^styles RewriteCond %{REQUEST_URI} !^css RewriteCond %{REQUEST_URI} !\.css RewriteCond %{REQUEST_URI} !^js RewriteCond %{REQUEST_URI} !\.js RewriteCond %{REQUEST_URI} !^images RewriteCond %{REQUEST_URI} !^img RewriteCond %{REQUEST_URI} !^webstat RewriteCond %{REQUEST_URI} !^fonts RewriteCond %{REQUEST_URI} !\.ttf RewriteCond %{REQUEST_URI} !\.woff
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)\.xml$ index.php?xmlMode=force&path=$1&%{QUERY_STRING} [L]
RewriteRule ^\/?(udata|upage|uobject|ufs|usel|ulang|utype|umess|uhttp):?(\/\/)?(.*)$ releaseStreams.php?scheme=$1&path=$3&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)\.json$ index.php?jsonMode=force&path=$1&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_URI} !^styles RewriteCond %{REQUEST_URI} !^css RewriteCond %{REQUEST_URI} !\.css RewriteCond %{REQUEST_URI} !^js RewriteCond %{REQUEST_URI} !\.js RewriteCond %{REQUEST_URI} !^images RewriteCond %{REQUEST_URI} !^img RewriteCond %{REQUEST_URI} !^fonts RewriteCond %{REQUEST_URI} !\.ttf RewriteCond %{REQUEST_URI} !\.woff
RewriteCond %{REQUEST_URI} !(\.ico|\.ICO)$ RewriteCond %{REQUEST_URI} !(\.jpg|\.JPG)$ RewriteCond %{REQUEST_URI} !(\.jpeg|\.JPEG)$ RewriteCond %{REQUEST_URI} !(\.png|\.PNG)$ RewriteCond %{REQUEST_URI} !(\.gif|\.GIF)$ RewriteCond %{REQUEST_URI} !(\.css|\.CSS)$ RewriteCond %{REQUEST_URI} !(\.js|\.JS)$ RewriteCond %{REQUEST_URI} !(\.ttf|\.TTF)$ RewriteCond %{REQUEST_URI} !(\.woff|\.WOFF)$ RewriteCond %{REQUEST_URI} !(\.svg|\.SVG)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?path=$1&%{QUERY_STRING}&umi_authorization=%{HTTP:Authorization} [L]
RewriteCond %{REQUEST_URI} (\.ico|\.ICO)$
RewriteCond %{REQUEST_URI} (\.jpg|\.JPG)$
RewriteCond %{REQUEST_URI} (\.jpeg|\.JPEG)$
RewriteCond %{REQUEST_URI} (\.png|\.PNG)$
RewriteCond %{REQUEST_URI} (\.gif|\.GIF)$
RewriteCond %{REQUEST_URI} (\.css|\.CSS)$
RewriteCond %{REQUEST_URI} (\.js|\.JS)$
RewriteCond %{REQUEST_URI} (\.ttf|\.TTF)$
RewriteCond %{REQUEST_URI} (\.woff|\.WOFF)$
RewriteCond %{REQUEST_URI} (\.svg|\.SVG)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ [R=404]
<IfModule mod_mime.c>
AddType application/x-java-applet .class
AddType text/x-component .htc
</IfModule>
<IfModule mod_security.c> SecFilterScanPOST Off </IfModule>
<Files "whatsnew.txt"> Deny from all </Files>
- UMI_CMS_HTACCESS_END ############################
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
