php - Loading a single file for all pages -
php - Loading a single file for all pages -
i running apache webserver, goal have loader (in php) gets loaded urls. illustration if head website.com/test/, website.com/page.php or website.com/ load website.com/index.php
how can accomplish this?
you can create .htaccess file rewrite url not file or directory on server , redirect index.php
file. additionally can have original url attached query string can work in script if need be.
<ifmodule mod_rewrite.c> rewriteengine on rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.*)$ index.php?$1 [l,qsa] </ifmodule>
php apache
Comments
Post a Comment