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

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -