php - Loading a single file for all pages -
I am running an Apache Web server, my goal is a loader (in PHP) that loads from all URLs. For example, if you head to website.com/test/, website.com/page.php or just website.com/ then it will always load website.com/index.php
I How can I get this?
You can create an .htaccess file that will have to rewrite the URL for anything There is no file or directory on your server and it redirects to the index.php file. Additionally you can have the original URL attached to the query string so that you can work with it in your script. Rewrite code% {REQUEST_FILENAME} on rewriting! -d Recovery code% {REQUEST_FILENAME}! -f rewriting rule ^ (. *) $ Index.php? $ 1 [L, QSA] & lt; / IfModule & gt;
Comments
Post a Comment