All Projects → ilopX → Yii2 Basic Htaccess

ilopX / Yii2 Basic Htaccess

File htaccess for yii2 basic

Labels

Projects that are alternatives of or similar to Yii2 Basic Htaccess

Getyii
Yii2 community 请访问
Stars: ✭ 418 (+488.73%)
Mutual labels:  yii
Dotplant2
E-Commerce CMS - Yii Framework 2 (yii2, shop)
Stars: ✭ 636 (+795.77%)
Mutual labels:  yii
Config
Yii2 application runtime configuration support
Stars: ✭ 54 (-23.94%)
Mutual labels:  yii
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
Yii2 Httpclient
Yii 2 HTTP client
Stars: ✭ 406 (+471.83%)
Mutual labels:  yii
Ppma
[INACTIVE] PHP Password Manager
Stars: ✭ 62 (-12.68%)
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
Cms
Feehi CMS based on yii2
Stars: ✭ 493 (+594.37%)
Mutual labels:  yii
Yii2 App Basic
Yii 2.0 Basic Application Template
Stars: ✭ 548 (+671.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
Yii Core
Yii Framework 3.0 core
Stars: ✭ 441 (+521.13%)
Mutual labels:  yii
Lang Sc
一本字典
Stars: ✭ 57 (-19.72%)
Mutual labels:  yii
Yii2 Redis
Yii 2 Redis extension.
Stars: ✭ 416 (+485.92%)
Mutual labels:  yii
Yii2 Template Unify
WB0412697
Stars: ✭ 6 (-91.55%)
Mutual labels:  yii
Yii2 Smarty
Yii 2 Smarty Extension.
Stars: ✭ 67 (-5.63%)
Mutual labels:  yii
Sitemap
Site map creation support
Stars: ✭ 59 (-16.9%)
Mutual labels:  yii
App Basic
Base app on SkeekS CMS (Yii2)
Stars: ✭ 10 (-85.92%)
Mutual labels:  yii

#Yii2 basic htaccess

Demo

Video Demo

Video Demo

a. Automatic setting index.php

This method created .htaccess files automatically and clear self.

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].