php - Routing with apache -


i'm trying friendly url apache , php, try method :
.htaccess fallback ressource :

fallbackresource /route.php directoryindex route.php 

and route.php file (just test moment) :

<?php echo "url=".$_server['request_uri']; ?> 

if try access /test, display url=/test, if try /home apache display content of folder /var/www, how can fix ?
thank help.

to redirect urls route.php, use .htaccess

rewriteengine on rewritecond %{request_uri} !/route.php rewriterule ^(.*)$ /route.php?url=$1  [l] 

Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -