Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

336
Vistas
DirectAdmin Apache - .htaccess rewrite(s)

I'm having trouble setting up a rewrite and hoping someone knows the answer.

This is the code that i'm currently using in .htaccess:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /point/to/dir/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(\d+/.*)$ https://domain.ext/point/to/dir/module/status.php?id=$1 [L,QSA]

The client is requesting domain.ext/point/to/dir/ from the server, which should be rewritten to https://domain.ext/point/to/dir/module/status.php.

It is possible that a query is added to the end of the /point/to/dir/ request, which should be appended to https://domain.ext/point/to/dir/module/status.php. The /point/to/dir/ is a non-existing location on the server.

No matter what I do, I keep getting internal server errors (incorrect .htaccess configuration/syntax) or 404's. Hope someone can help out.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

With your shown samples, have your htaccess Rules file in following manner. Make sure you change your path from point/to/dir to your actual path(DO NOT put / in front of it in rule else that wouldn't work).

This is assuming that your point/do/dir has module folder and index.php inside module folder too.

Make sure to clear your browser cache before testing your URLs.

Options +FollowSymLinks
RewriteEngine on
RewriteBase /point/to/dir/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(point/to/dir)/(.*)/?$ https://domain.ext/$1/module/status.php?id=$2 [NC,L,QSA]


OR in case you are in same domain name then you need not to mention complete url in right part of rewriting, have it then following way, make sure either use above or following rules one at a time only.

Options +FollowSymLinks
RewriteEngine on
RewriteBase /point/to/dir/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(point/to/dir)/(.*)/?$ $1/module/status.php?id=$2 [NC,L,QSA]
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda