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

531
Views
Error de reglas de reescritura de URL: la URL solicitada no se encontró en este servidor

Estoy creando las reglas en el archivo .htaccess en mi carpeta de dominio.

Mi url en el servidor es:

https://www.everyoneknows.com.my/customer/?loc=dashboard

Y quiero cambiar la url a:

https://www.everyoneknows.com.my/customer/dashboard/

En el archivo .htaccess, escribo las reglas:

 RewriteEngine On RewriteCond %{HTTP_HOST} ^everyoneknows\.com\.my [OR,NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.everyoneknows.com.my/$1 [R,L] ##External redirect to /customer/dashboard url rules here. RewriteCond %{QUERY_STRING} ^loc\=dashboard$ RewriteRule ^customer/$ https://www.everyoneknows.com.my/customer/dashboard/? [R=301,L]

Y se muestra el mensaje de error:

 Not Found The requested URL was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

imagen

Espero que alguien pueda guiarme sobre cómo corregir mis reglas de reescritura de URL. Gracias.

resultado original:

ingrese la descripción de la imagen aquí

Actualizado 1

ingrese la descripción de la imagen aquí

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Necesita una regla de redirección para la URL antigua a la nueva y una regla de reescritura interna para manejar la URL bonita:

 RewriteEngine On RewriteCond %{HTTP_HOST} ^everyoneknows\.com\.my [OR,NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^ https://www.everyoneknows.com.my%{REQUEST_URI} [R=301,NE,L] # external redirect from actual URL to pretty one RewriteCond %{THE_REQUEST} \s/+(customer)/\?loc=([^\s&]+) [NC] RewriteRule ^ /%1/%2/? [R=301,L,NE] # internal forward from pretty URL to actual one RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(customer)/([\w-]+)/?$ $1/?loc=$2 [L,QSA,NC]

Esto supone que no hay .htaccess en el subdirectorio customer/ . Asegúrese de borrar la memoria caché de su navegador antes de probar este cambio.

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!