Skip to content

Instantly share code, notes, and snippets.

@Guibzs Guibzs/.htaccess
Last active Jul 18, 2019

Embed
What would you like to do?
Symfony 4 ~ .htaccess
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /index.php/
</IfModule>
</IfModule>
@elexfreeman

This comment has been minimized.

Copy link

commented Nov 30, 2018

thx very mach

@DmytroUhlach

This comment has been minimized.

Copy link

commented Feb 6, 2019

Thank you!

@Sindidi

This comment has been minimized.

Copy link

commented Feb 14, 2019

Thank you

@furkan54gs

This comment has been minimized.

Copy link

commented Feb 21, 2019

Thank you very much !

@medmek

This comment has been minimized.

Copy link

commented Mar 11, 2019

Hey thank you 👍

In symfony, should this .htaccess be in public or root ?

@Aviortheking

This comment has been minimized.

Copy link

commented Mar 20, 2019

Hey thank you

In symfony, should this .htaccess be in public or root ?

in the public folder

@miertschink

This comment has been minimized.

Copy link

commented Apr 5, 2019

Works fine - thx
just in case somebody is searching for:
I got a 403 Forbidden on All-inkl when using Symfony 4 and public as Domain-Root configured in the KAS

@hous04

This comment has been minimized.

Copy link

commented May 1, 2019

Hi
How can we force www. for all routes ?

@jyyyy

This comment has been minimized.

Copy link

commented May 9, 2019

Thank you very much you saved my life

@AlphaHasi

This comment has been minimized.

Copy link

commented Jun 7, 2019

Thanks a million times! I can understand that the team took the htaccess files out, even from the "out-of-the-box-works-instantly-version", but it would be nice, if they give at least a hint at one of the million places where you can read about download, start, install, deploy the stuff…

@jrolopez20

This comment has been minimized.

Copy link

commented Jul 4, 2019

I have used this and work BUT not load images, css, javascripts files. what can i do??

@bklein01

This comment has been minimized.

Copy link

commented Jul 13, 2019

perfect... thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.