mirror of
https://github.com/WilliamAAK/Route2.git
synced 2025-04-18 17:37:18 +00:00
Docs: update
This commit is contained in:
parent
f9b451ef48
commit
c413451500
12
README.md
12
README.md
@ -102,19 +102,17 @@ http_response_code(404);
|
|||||||
<h1>Page not found!</h1>
|
<h1>Page not found!</h1>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Access directly:
|
The simplest way to access your routes is to put the file in your favorite folder and run it! E.g if you request `http://your.site/yourscript.php/your/route` the route will be automatically converted to `/your/route`
|
||||||
|
|
||||||
The simplest way to access your routes, put the file in your favorite folder and run it! E.g if you request `http://your.site/yourscript.php/your/route` the route will be automatically converted to `/your/route`
|
# Rewrite requests
|
||||||
|
|
||||||
### Rewrite requests:
|
|
||||||
|
|
||||||
Want to hide that pesky script name (e.g `index.php`) from the URL?
|
Want to hide that pesky script name (e.g `index.php`) from the URL?
|
||||||
|
|
||||||
#### FrankenPHP:
|
### FrankenPHP:
|
||||||
|
|
||||||
It is recommended that you use FrankenPHP the modern PHP app server. This behavior is enabled by default.
|
It is recommended that you use FrankenPHP the modern PHP app server. This behavior is enabled by default.
|
||||||
|
|
||||||
#### NGINX:
|
### NGINX:
|
||||||
|
|
||||||
With PHP already installed and configured you may add this to the server block of your configuration to make requests that don't match a file on your server to be redirected to `index.php`
|
With PHP already installed and configured you may add this to the server block of your configuration to make requests that don't match a file on your server to be redirected to `index.php`
|
||||||
|
|
||||||
@ -124,7 +122,7 @@ location / {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Apache:
|
### Apache:
|
||||||
|
|
||||||
Make sure that mod_rewrite is installed on Apache. On a unix system you can just do
|
Make sure that mod_rewrite is installed on Apache. On a unix system you can just do
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user