Skip to content

Add Nginx URL Rewrite Rules for Laravel Project with Livewire and/or Filament PHP#171

Merged
xpf0000 merged 2 commits into
xpf0000:masterfrom
DarpanCodes:feature/nginx-livewire-filament-config
Jan 9, 2025
Merged

Add Nginx URL Rewrite Rules for Laravel Project with Livewire and/or Filament PHP#171
xpf0000 merged 2 commits into
xpf0000:masterfrom
DarpanCodes:feature/nginx-livewire-filament-config

Conversation

@DarpanCodes
Copy link
Copy Markdown

Description

This pull request introduces two new common Nginx URL rewrite rules in the hosts editor:

Laravel with Livewire

Adds URL rewrite rules necessary for handling Livewire requests.

location / {
    try_files $uri $uri/ /index.php$is_args$query_string;
}

location ^~ /livewire {
    try_files $uri $uri/ /index.php?$query_string;
}

Laravel with Filament PHP

Adds URL rewrite rules necessary for handling of FilamentPHP requests.

location / {
    try_files $uri $uri/ /index.php$is_args$query_string;
}

location ~ ^/(filament|livewire) {
    try_files $uri $uri/ /index.php$is_args$query_string;
}

##purpose

These URL rewrite rules aim to streamline the setup process for developers using Laravel with Livewire or Filament PHP, reducing the need for manual configuration.

@xpf0000 xpf0000 merged commit 5aa7b27 into xpf0000:master Jan 9, 2025
@DarpanCodes DarpanCodes deleted the feature/nginx-livewire-filament-config branch January 10, 2025 04:18
pull Bot referenced this pull request in louanfontenele/FlyEnv-PT-BR May 19, 2025
…ent-config

Add Nginx URL Rewrite Rules for Laravel Project with Livewire and/or Filament PHP
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

Successfully merging this pull request may close these issues.

2 participants