Skip to content

Instantly share code, notes, and snippets.

@pazteddy
Last active February 19, 2026 16:58
Show Gist options
  • Select an option

  • Save pazteddy/65e9cad23b1baf1b6b94b676d7966b29 to your computer and use it in GitHub Desktop.

Select an option

Save pazteddy/65e9cad23b1baf1b6b94b676d7966b29 to your computer and use it in GitHub Desktop.
Permisos al directorio del proyecto para poder escribir con el usuario daemon (Apache/PHP) y manejo de enrutamiento
RewriteEngine On
# Si la petición es a un archivo o directorio que existe lo mostramos directamente
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Realizamos el enrutamiento para todas las peticiones
RewriteRule ^ Index.php [L,QSA]
PROJECT="mi-proyecto";
sudo mkdir -p "/Applications/XAMPP/xamppfiles/htdocs/$PROJECT"
&& sudo chown -R "$USER":daemon "/Applications/XAMPP/xamppfiles/htdocs/$PROJECT"
&& sudo find "/Applications/XAMPP/xamppfiles/htdocs/$PROJECT" -type d -exec chmod 2775 {} \;
&& sudo find "/Applications/XAMPP/xamppfiles/htdocs/$PROJECT" -type f -exec chmod 664 {} \;
&& ls -ld "/Applications/XAMPP/xamppfiles/htdocs/$PROJECT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment