ilopX / Yii2 Basic Htaccess
File htaccess for yii2 basic
Stars: ✭ 71
Labels
Projects that are alternatives of or similar to Yii2 Basic Htaccess
Yii2 Shop
Example project implementing simple shop using Yii 2.0
Stars: ✭ 442 (+522.54%)
Mutual labels: yii
Hookphp
HookPHP基于C扩展搭建内置AI编程的架构系统-支持微服务部署|热插拔业务组件-集成业务模型|权限模型|UI组件库|多模板|多平台|多域名|多终端|多语言-含常驻内存|前后分离|API平台|LUA QQ群:679116380
Stars: ✭ 575 (+709.86%)
Mutual labels: yii
Opensourcewebsite Org
OpenSourceWebsite (OSW) - online community managed by users using electronic voting and modifying source code
Stars: ✭ 834 (+1074.65%)
Mutual labels: yii
Yupe
Yupe! is an open source Yiiframework-based online e-commerce solution. Demo https://demo.yupe.ru/
Stars: ✭ 596 (+739.44%)
Mutual labels: yii
Phpnetmap
Web application for ethernet network mapping. PHP Software for network device monitoring with SNMP v(1/2c/3) protocol.
Stars: ✭ 20 (-71.83%)
Mutual labels: yii
A Guide To Yii Grids Lists And Data Providers
A guide to Yii framework grids, lists and data providers
Stars: ✭ 26 (-63.38%)
Mutual labels: yii
#Yii2 basic htaccess
Video Demo
index.php
a. Automatic settingThis method created .htaccess files automatically and clear self.
- Download file index.php or composer require ilopx/yii2-basic-htaccess
- Put to root yii2 application
- Start http://{your_yii2_webapp}
- Follow step 3 in Manual setting
b. Manual setting
1. step
create file {root}/.htaccess:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
</IfModule>
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} ^/.*
RewriteRule ^(.*)$ web/$1 [L]
RewriteCond %{REQUEST_URI} !^/web/
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ web/index.php
</IfModule>
2. step
create file {root}/web/.htaccess:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
3. step
update file {root}/config/web.php:
'request' => [
'baseUrl' => '',
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'' => 'site/index',
'<action>'=>'site/<action>',
],
],
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].