Skip to content
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

Second Subdirectory Routing Not Working #410

Open
MASRPNathan-G opened this issue Oct 22, 2021 · 0 comments
Open

Second Subdirectory Routing Not Working #410

MASRPNathan-G opened this issue Oct 22, 2021 · 0 comments

Comments

@MASRPNathan-G
Copy link

I've successfully set up Klein in subdomain of my site cad.website.xyz/path/to/routing/.
In there I have my .htaccess file which contains the following:

Options -MultiViews

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Along with the following PHP script at the top of my index.php:

$base  = dirname($_SERVER['PHP_SELF']);
if(ltrim($base, '/')){$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'], strlen($base));}

This config works for that portion of my site. Using the same .htaccess config with the PHP script atop my index file allows Klein to work with the respond all response, but anything else throws a 404 error. I'm not sure if it would matter much but I've tried removing the existing .htaccess file from the initial subdomain to see if it was conflicting with the one I'm attempting to set up, but it didn't change anything.

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant