Mike Rockett Posted June 4, 2014 Share Posted June 4, 2014 Just curious as to why all requests that are sent to index.php are routed through the it GET param... RewriteRule ^(.*)$ index.php?it=$1 [L,QSA] Any particular reason why it isn't simply this: RewriteRule ^(.*)$ index.php [L,QSA] Or even this: RewriteRule ^ index.php [L,QSA] ? Link to comment Share on other sites More sharing options...
Mike Rockett Posted August 28, 2014 Author Share Posted August 28, 2014 Completely forgot that I posted this... Anybody? Link to comment Share on other sites More sharing options...
jordanlev Posted September 9, 2014 Share Posted September 9, 2014 I am a newbie to ProcessWire, so I am only guessing here based on my experience with other CMS's... The requested path needs to be provided to the processwire system somehow, so it knows what page to show. If you're not using a CMS or a framework, then usually what is served to the browser is a php or html file that exists at the requested path... but with a CMS like processwire, there aren't actual files on the server for all the pages that are created in the dashboard. So instead, ALL requests for all paths are sent to the processwire system, and it examines what the requested path was and retrieves the appropriate content from the database based on that. The "it" variable is how the requested path is communicated to processwire from apache. I've seen other systems use a different approach, using php's $_SERVER['PATH_INFO'] , but sometimes this causes problems depending on the server settings, so perhaps processwire avoids this method to cut down on potential problems. 1 Link to comment Share on other sites More sharing options...
mrjasongorman Posted February 4, 2015 Share Posted February 4, 2015 To be honest ProcessWire is the first system i've come across where requests have to be routed specifically to a GET param, but i guess it's just a code design decision. It does bring up some issues though with using PHP 5.4's local -S test server. 1 Link to comment Share on other sites More sharing options...
Mike Rockett Posted February 4, 2015 Author Share Posted February 4, 2015 Once again, I don't know how I missed the first reply... Sorry about that. @mrjasongorgman - Yeah, I just don't see it often anywhere. There has to be a really good reason for it... @jordanlev - The paths would be routed to PW with both methods. Only trying to figure out why it goes through a GET param... Anyways, it works - so I couldn't complain. That said, I'd love to know the reason. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now