I want the following:
www.bla-bla.com/
-->www.bla-bla.com/php/index.php
www.bla-bla.com/php/index.php
-->www.bla-bla.com/php/error.php
I have tried the following but doesn't work
RewriteEngine on
RewriteRule ^/?$ /php/index.php [S=1]
RewriteCond %{REQUEST_URI} =/php/index\.php
RewriteRule (.*)? /php/error.php [R=404]
What can I do to deny access from real path?
URL=http://localhost
(3) [perdir C:/xampp/htdocs/] strip per-dir prefix: C:/xampp/htdocs/ ->
(3) [perdir C:/xampp/htdocs/] applying pattern '/php/index\.php' to uri ''
(3) [perdir C:/xampp/htdocs/] strip per-dir prefix: C:/xampp/htdocs/ ->
(3) [perdir C:/xampp/htdocs/] applying pattern '^(/?)$' to uri ''
(2) [perdir C:/xampp/htdocs/] rewrite '' -> '/php/index.php'
(1) [perdir C:/xampp/htdocs/] internal redirect with /php/index.php [INTERNAL REDIRECT]
(3) [perdir C:/xampp/htdocs/] strip per-dir prefix: C:/xampp/htdocs/php/index.php -> php/index.php
(3) [perdir C:/xampp/htdocs/] applying pattern '/php/index\.php' to uri 'php/index.php'
(3) [perdir C:/xampp/htdocs/] strip per-dir prefix: C:/xampp/htdocs/php/index.php -> php/index.php
(3) [perdir C:/xampp/htdocs/] applying pattern '^(/?)$' to uri 'php/index.php'
(1) [perdir C:/xampp/htdocs/] pass through C:/xampp/htdocs/php/index.php
URL=http://localhost/php/index.php
(3) [perdir C:/xampp/htdocs/] strip per-dir prefix: C:/xampp/htdocs/php/index.php -> php/index.php
(3) [perdir C:/xampp/htdocs/] applying pattern '/php/index\.php' to uri 'php/index.php'
(3) [perdir C:/xampp/htdocs/] strip per-dir prefix: C:/xampp/htdocs/php/index.php -> php/index.php
(3) [perdir C:/xampp/htdocs/] applying pattern '^(/?)$' to uri 'php/index.php'
(1) [perdir C:/xampp/htdocs/] pass through C:/xampp/htdocs/php/index.php
Options +FollowSymlinks RewriteEngine on
RewriteRule /php/index\.php /php/error.php [L]
RewriteRule ^(/?)$ /php/index.php [QSA,L]
Wtf is going on here?