The Slim Framework support forum has moved to This Tender forum is no longer maintained or monitored.

Issues with Slim 2.6.2, XAMPP, Rewrites, Subfolders, and Routes.

MooK's Avatar


24 Feb, 2016 05:59 PM


I've read more than a handful of posts on this forum about this very issue, but none seem to identify the exact problem that I'm facing.

XAMPP is installed locally to run in C:/xampp, with a DocumentRoot of C:/xampp/htdocs. That's a pretty standard default case. Rewrites are enabled.

I have all of my development work on a separate partition, located here:


As a result, I have a symlink between C:/xampp/htdocs/development and M:/development.

I also have a hosts file setup for the following:


My production server will be forced to run PHP 5.3.x, and I do not have control over this, hence my need to use Slim 2.6.x. I don't need Slim 3.0, so I'm quite happy working with 2.6.2.

When I visit my slim installation, I can simply put the following in my address bar:


My hierarchy looks as following:

    - slim-install
        - public
            - index.php [$app -> run()]

My .htaccess is also pretty simple:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,QSA]

And I do have the following route:

$app -> get('/', function() use ($app) {
    print('Hello World!');

When I visit http://localhost/development/slim-install/public I am greeted with a 404 not found error. If I try http://localhost/development/slim-install/public/index.php/ I also receive a 404 not found error. However, if I change the following:

$app -> get('/development/slim-install/public/', function() use ($app) {

I see "Hello World!" and if I revert that change, and set the following:

$_SERVER['REQUEST_URI'] = str_replace($_SERVER['REQUEST_URI'], 'development/slim-install/public/', '');

I also see "Hello World!"

One solution I see is to create a vhost for to load this specific document root, but I was wondering if there was a better way to run the Slim install in a sub-folder, like this setup, without changing routes or superglobals.

Thank you!

  1. 1 Posted by sagarkhna999 on 11 May, 2016 06:47 AM

    sagarkhna999's Avatar

    good After saving the program, stick to the recommendations by clicking on it. it will save in the YouTube itself but one can enjoy nice.

  2. 2 Posted by roman on 25 Nov, 2016 07:08 AM

    roman's Avatar

    good you can look at some of the confetti in the weather. Centering on the point in time is certainly major when you're taking pictures honest occasions. great.

  3. 3 Posted by James on 17 Feb, 2017 10:00 AM

    James's Avatar

    Great Imo application is formally not offered for PC/Desktop. These are the 11 features which I have actually Fine.

  4. 4 Posted by sania on 23 Apr, 2017 10:44 AM

    sania's Avatar

    Currently you can enjoy Mobdro application on your gamer background and also you can see the last.

  5. 5 Posted by Tom Parker on 06 May, 2017 10:56 AM

    Tom Parker's Avatar

    I am stuck in a similar problem like you. Hope someone helps XBox 2 Features

  6. 6 Posted by john on 07 Jun, 2017 04:37 AM

    john's Avatar

    lip-syncing to a top hit that everyone understands and I plainly bear in mind the groups and also songs or solo musicians.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac