Questions tagged [url-routing]
URL routing lets you configure an application to accept request URLs that do not map to physical files.
                128 questions
            
            
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                256
            
            views
        
        
            
            
        HTTP routing with Mongoose
                    I'm trying to extend the Mongoose RESTful server example with URL routing.
This code relies on the Mongoose library available here.
This is heavily inspired by the routes class from this question but ...
                
            
       
        
            
                3
            
            votes
        
        
            
                2
            
            answers
        
        
            
                244
            
            views
        
        
            
            
            
        PHP Router For MVC with strict routing requirements
                    I had previously asked the question here.
The response was pretty much "wow this is bad".
So I learned everything I could and wrote what I believe to be better using TDD.
The strict ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                366
            
            views
        
        
            
            
            
        Index.php automatic router for custom MVC
                    In house we have been building our own MVC framework. One of the things that was important in the project was to not have to add routes manually but instead have a standard and let the index ...
                
            
       
        
            
                4
            
            votes
        
        
            
                1
            
            answer
        
        
            
                1k
            
            views
        
        
            
            
            
        NextJS with a root level catchall route for all URLs dynamic middleware that splits into components
                    Here is the solution that I have. Due to the legacy product we have all of our URLs in one big Slug model in rails that maps URLs to models.
EG
...
                
            
       
        
            
                3
            
            votes
        
        
            
                2
            
            answers
        
        
            
                228
            
            views
        
        
            
        Router and solid principle
                    I would like to know if my Routing system respects the solid principle ?
The system is simple, Router class contains the routes and returns the correct route and Route class represents a route, ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                369
            
            views
        
        
            
            
            
        Route Improvement in Laravel 8
                    I have below route. I am using Laravel 8.
...
                
            
       
        
            
                4
            
            votes
        
        
            
                1
            
            answer
        
        
            
                416
            
            views
        
        
            
            
            
        URL router for production
                    So I've written a URL router which also allows for wildcards (path parameters).
A URL like /users/{uuid} can be added and then, when a user sends a request to the ...
                
            
       
        
            
                2
            
            votes
        
        
            
                0
            
            answers
        
        
            
                106
            
            views
        
        
            
        implementation of a mvc url router with low coupling and solid principles
                    i'm building an url router and i want to improve it to respect SOLID principles, i want suggestions of how can i make it less coupled.
here's my current code:
Router.php
    
...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                397
            
            views
        
        
            
        http router written in Golang
                    in my jurney to learn Go, I decided to write a simple router which I called it Gouter, which I think it has most of the features in gorilla/mux but in my opinion it's easier to use. Anyway, it ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                105
            
            views
        
        
            
            
            
        PHP code for blacklisting and rewriting/redirecting URLs
                    We faced an issue where URLs had a wrong "subfolder" in its URL, so e.g. 
example.com/match1/randomgenerated
should have been
...
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                86
            
            views
        
        
            
            
        Improving PHP MVC code for personal website [closed]
                    Github for project: https://github.com/wrpd/portfolio
I have a very general understanding of MVC but haven't ever implemented it. In an effort to improve my understanding and get back into a little ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                78
            
            views
        
        
            
            
        Simple Go REST API that returns dummy messages
                    I am a learner in Go and wrote example below in a day so I would like to get some suggestions to improve it. It is a simple rest api that currently just accepts request and returns a dummy message. My ...
                
            
       
        
            
                3
            
            votes
        
        
            
                0
            
            answers
        
        
            
                57
            
            views
        
        
            
        Rails route structure for managing tags
                    I'm hoping someone could vet my route structure as I've really been struggling with getting something that feels right. Right now I have this nested resource structure: 
...
                
            
       
        
            
                4
            
            votes
        
        
            
                0
            
            answers
        
        
            
                636
            
            views
        
        
            
            
        Simple routing in Rust
                    After my last attempt, I started to learn Rust again. This time I wrote a simple HTTP router. I would appreciate it if you could help me to fix my mistakes. 
Here is the link of the repository
main....
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                2k
            
            views
        
        
            
            
        Implementation of Private Route with Auth using react-router and Context API
                    I'm trying to implement safe routes and checking if the user is authorized using only Context API.
I'm also trying to avoid that the user can see a PrivateRoute, ...