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 - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -