承接 mvccore/ext-request-apachedpi 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mvccore/ext-request-apachedpi

Composer 安装命令:

composer require mvccore/ext-request-apachedpi

包简介

MvcCore - Extension - Request - Apache DPI - request BasePath property correction for applications using Apache .htaccess [DPI] flag.

README 文档

README

MvcCore Extension - Request - Apache DPI

Latest Stable Version License PHP Version

MvcCore Request extension to correct request BasePath property - for applications using Apache .htaccess [DPI] flag.

Installation

composer require mvccore/ext-request-apachedpi

Usage

I you are using more PHP applications with more different domains in one webhosting space, you always need to route every request into different index .htaccess file.

.htaccess in webhosting root:

# disable directory listing
Options -Indexes
# mod_rewrite
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteRule .* - [E=REDIRECT_PATH:]
	# If directory with HTTP_HOST name exists in domains directory, 
	# dispatch request into this webhosting directory with requested application:
	RewriteCond %{HTTP_HOST} ^(.*)$
	RewriteCond %{DOCUMENT_ROOT}/domains/%1 -d
	RewriteRule (.*) domains/%1/$1 [DPI,QSA,E=REDIRECT_PATH:/domains/%1,L]
</IfModule>

.htaccess in application root (classic):

# disable directory listing
Options -Indexes
# mod_rewrite
<IfModule mod_rewrite.c>
	RewriteEngine On
	# forbid the direct access to app directories (eg. config-files, ...)
	RewriteRule ^App/.*$ / [F,L]
	RewriteRule ^vendor/.*$ / [F,L]
	# basic zend-framework setup see: http://framework.zend.com/manual/en/zend.controller.html
	RewriteCond %{REQUEST_FILENAME} -s [OR]
	RewriteCond %{REQUEST_FILENAME} -l [OR]
	RewriteCond %{REQUEST_FILENAME} -f
	RewriteRule ^(.*)$ $1 [NC,L]
	RewriteRule ^.*$ index.php [NC,L]
</IfModule>

PHP application Bootstrap.php

Put this patching code in very beginning of your application:

\MvcCore::GetInstance()->SetRequestClass(\MvcCore\Ext\Request\ApacheDpi::class);

统计信息

  • 总下载量: 23
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-01-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固