-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-stand alone issues with .htaccess file #161
Comments
I agree, what would you suggest? |
There's a lot of variations, things get messy when you consider forcing trailing slashes (/foo vs /foo/) for pragmatism. There should be a disclaimer about these complexities along with a very basic 'get er working' suggestion:
|
In regard to forcing trailing slashes, I have developed the habit of ending each @uri with /**
* @uri /customer/:customerId/?
*/ While this may not be the best practice, it was the simplest solution I could come up with. It should also provide more flexibility across varying development environments. |
Personally, I don't really like forcing slashes in the web server. I would be +1 for this being an optional commented out piece. I also +1 @rovangju your RewriteBase comment. Also here's a pretty weird variation I had not seen before, https://github.com/zendframework/ZendSkeletonApplication/blob/master/public/.htaccess. I'd like to note that I actually tried this in one of my sites running through CGI with tonic, and it didn't work. |
I think my suggestion is coming from my newness to tonic. I hadn't used the php -S stand alone option before. Thats really nice, and got me working with tonic right away. But, later, when I went to figure out what was needed to deploy the simple service I'm testing, I had a hard time trying to get everything working correctly with apache. In digging I found the .htaccess file. By playing around, I figured out, it was what I needed to focus on. |
I think putting more information up about the .htaccess file might be useful for people.
It took me a good bit of time to figure out what was going on between apache and the dispatcher.
RewriteEngine On RewriteCond %{REQUEST_URI} !dispatch.php$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .\* dispatch.php [L,QSA]The text was updated successfully, but these errors were encountered: