Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

211
Views
Regla de reescritura de Apache para eliminar parte del directorio de la URL

Tengo los siguientes sitios de prueba configurados con apache y servidos desde el siguiente lugar /htdocs/www/* :

 https://local.sweetcar.com/www/mycompany/ https://local.sweetcar.com/www/sweetcar/

Me gustaría configurar una reescritura de apache para servir las siguientes direcciones URL

 https://local.mycompany.com/ https://local.sweetcar.com/

Entonces , www/mycompany/ y www/sweetcar/ se eliminan de la URL mientras se conserva todo lo demás.

Esto es lo que probé sin éxito:

.htaccess

 RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L]
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puede usar estas reglas en la raíz del sitio .htaccess:

 RewriteEngine On RewriteBase / RewriteCond %{ENV:REDIRECT_STATUS} !200 RewriteCond %{HTTP_HOST} ^local\.([^.]+)\. [NC] RewriteRule !^www/ www/%1%{REQUEST_URI} [L,NC] RewriteRule ^index\.php$ - [L]
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Virtual assistant