How to ignore some paths? #3803
Replies: 1 comment
-
YOURLS relies on the web server to send it requests that don't match an existing path. You can see this logic in the sample Apache ( This only works when YOURLS is sharing a domain with "real" paths, though. React routes don't exist on the filesystem, so the web server can't tell them apart from paths that don't exist at all and should be handled by YOURLS. It should be possible to create rules for more specific locations earlier in the web server configuration, if you match them up to the React routes that are defined, but unless there is a way to automatically extract the valid routes in an Apache or Nginx plug-in module you'll have to maintain the routes in two separate places (the React app itself, and the server config). Creating a custom configuration for your web server might be able to make things work for you, but YOURLS is not designed to share its web root with another application which manipulates paths that don't exist on the filesystem and we can't offer support for configuring that. |
Beta Was this translation helpful? Give feedback.
-
Lets say, I have hosted yourls in my domain.com
So its accessible at domain.com/admin and I can use domain.com where ever I want. So I have hosted a react app on the main domain.
The home page is loading and working fine in that. But when I am trying to access any route that is created in the react app (like domain.com/about or domain.com/contact) its redirecting to the home page.
So how to ignore some particular paths from yourls, so that my react pages can load at those paths?
Beta Was this translation helpful? Give feedback.
All reactions