2017 © Pedro Peláez
 

library ext-request-apachedpi

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

image

mvccore/ext-request-apachedpi

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

  • Friday, April 20, 2018
  • by tomFlidr
  • Repository
  • 1 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

THIS PACKAGE IS DEPRECATED AND NOT USED ANYMORE FROM MVCCORE VERSION 5 AND HIGHER.

MvcCore Extension - Request - Apache DPI

Latest Stable Version License PHP Version, (*1)

MvcCore Request extension to correct request BasePath property - for applications using Apache .htaccess [DPI] flag., (*2)

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., (*3)

.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:, (*4)

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

The Versions

20/04 2018

dev-master

9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin framework extension mvc request apache plug-in flag ext mvccore dpi discard path

17/12 2017

v4.3.1

4.3.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin framework extension mvc request apache plug-in flag ext mvccore dpi discard path

07/10 2017

v4.2.0

4.2.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin framework extension mvc request apache plug-in flag ext mvccore dpi discard path

12/05 2017

v4.1.0

4.1.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin framework extension mvc request apache plug-in flag ext mvccore dpi discard path

29/01 2017

v4.0.0

4.0.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

plugin framework extension mvc request apache plug-in flag ext mvccore dpi discard path

26/01 2017

v3.2.0

3.2.0.0

MvcCore_Request extension - request BasePath property correction for applications using Apache .htaccess [DPI] flag.

  Sources   Download

BSD-3-Clause

The Requires

 

framework extension mvc request apache flag mvccore dpi discardpath

16/01 2017

v3.0.0

3.0.0.0

MvcCore_Request extension - request BasePath property correction for applications using Apache .htaccess [DPI] flag.

  Sources   Download

BSD-3-Clause

The Requires

 

framework extension mvc request apache flag mvccore dpi discardpath

16/01 2017

v3.1.0

3.1.0.0

MvcCore_Request extension - request BasePath property correction for applications using Apache .htaccess [DPI] flag.

  Sources   Download

BSD-3-Clause

The Requires

 

framework extension mvc request apache flag mvccore dpi discardpath