Skip to content

auto-generate .htaccess #60339

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

Closed
camilord opened this issue May 4, 2025 · 2 comments
Closed

auto-generate .htaccess #60339

camilord opened this issue May 4, 2025 · 2 comments

Comments

@camilord
Copy link

camilord commented May 4, 2025

Description

hi,

is it possible to auto-generate the .htaccess when you do composer require webapp ?

I believe its not only me, but many users too. create new project, do the usual stuff.. create controller then add route for url /blog then baam! not found.

happened few times already (long interval), took me hours to figure it out. then realise there's no .htaccess yet.

just suggesting if possible to autogenerate the .htaccess containing like:

/**
 * auto-generated by Symfony WebApp - 2025-05-04
 */
RewriteEngine On
Options -Multiviews
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

RewriteRule ^(.*) /index.php

or whatever Symfony team best to address the issue. :)

Example

No response

@xabbuh
Copy link
Member

xabbuh commented May 5, 2025

When installing symfony/apache-pack we have a recipe that provides an .htaccess file. I am not sure there is much more that we can do about this.

@chalasr
Copy link
Member

chalasr commented May 9, 2025

Closing as explained.

@chalasr chalasr closed this as completed May 9, 2025
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

3 participants