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

162
Views
asignación de subdominio a subcarpeta

por ejemplo, mi subdominio es abc.example.com

mi carpeta es /htdocs/abcfiles

mi requisito es cuando accedo a la url http://abc.example.com . mostrará la página web de la carpeta "abcfiles/".

mi archivo .htaccess

 RewriteEngine On RewriteCond %{HTTP_HOST} ^abc.example.com$ RewriteCond %{REQUEST_URI} !^/abcfiles/ RewriteRule (.*) /abcfiles/$1 [L] RewriteBase /abcfiles/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /abcfiles/index.php [L]

Está funcionando pero se muestra "/abcfiles/" en algunos enlaces. es decir, abc.example.com/abcfiles/...

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puede tener este código en la raíz del sitio .htaccess:

 RewriteEngine On # if /abcfiles/ is in URL then remove it RewriteCond %{THE_REQUEST} \s/abcfiles/(\S*) [NC] RewriteRule ^ /%1 [L,NE,R=301] # if hostname starts with abc. then route the request to abcfiles/ RewriteCond %{HTTP_HOST} ^abc\. [NC] RewriteCond %{REQUEST_URI} !^/abcfiles/ [NC] RewriteRule (.*) abcfiles/$1 [L]

Tenga este código en abcfiles/.htaccess :

 RewriteEngine On RewriteRule ^index\.php$ - [L,NC] # route every request to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d 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
Show me some job opportunities
There's an error!