I\'m currently working on an internal RESTful API, and I\'m using our main domain name as an environment identifier. However, I noticed that Slim
After playing with different Slim conditions and experiments, I started to look closer at the server level and making sure that the URL was passed correctly to the Slim routes.
Turns out this was an issue with PHP's development server, which is available through the php -S
command.
A quick google search revealed that several others had encountered the same issue, and it was a server issue, rather than a bug in Slim.
To test out my solution, I ran MAMP, and transferred all my files over. And then I wrote the .htaccess to redirect all requests through to index.php.
The moment of truth:
I typed in localhost:8888/campaigns/demo.com/12
and a wave of joy surged through my veins as I saw a line of beautiful, gorgeous demo.com/12
written across the browser! (I have an echo
statement for that particular route) A week-plus of troubleshooting and tinkering around has finally bore fruit!
\(^O^)/ Hoorah for Apache!
Thanks for your help @adosaiguas!