How can I reroute all requests for php pages through index.php?
My .htaccess is as follows:
Options +FollowSymLinks
IndexIgnore */*
#Turn on the RewriteEngine
RewriteEngine On
# Rules
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule !.*.(js|ico|gif|jpg|png|css|pdf)$ index.php%{REQUEST_URI} [L]
Basically, I'm trying to emulate .NET master pages. The index.php has the site header/footer.
It redirects 404 to index.php. How can I make it redirect all requests to php pages (except index.php itself)?
Is there any performance issues with this method (don't want to use a framework)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…