0

I've been searching and have yet to find an article to help me. I'm very unfamiliar when it comes to the rewrite engine of htaccess files, and am currently developing a php mvc framework.

Basically, from the root of the webserver, I need all page requests with their controllers / actions in the url to redirect to App/index.php

So, for example site.com/Login/ would direct to the index.php, and the uri would obviously be parsed out with php to enact the login controller with passed post data.

tereško
  • 58,060
  • 25
  • 98
  • 150
Braydon Batungbacal
  • 1,028
  • 2
  • 24
  • 52
  • You could just look it up in one of the 250 other "MVC" frameworks. – mario Oct 07 '11 at 23:39
  • possible duplicate of [Mod-Rewrite or PHP router?](http://stackoverflow.com/questions/1868154/mod-rewrite-or-php-router) – mario Oct 07 '11 at 23:40

1 Answers1

0

I think the 'usual' way is to forward all requests for non-existent files and directories to your controller:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ App/index.php [L]
Clive
  • 36,918
  • 8
  • 87
  • 113