Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
Create new productpage when new database entry

How can I create a new page when I enter a new product in my database, or hide the parameter inside a normal /.../ ?

In this example I will sell Sandles with the product-id 101010

I do not want to use parameters like in the following example:

example.com/shop?productid=101010

But I would like the new page to be

example.com/shop/sandles
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

First of all you'll need be able to fetch product not by some numeric ID (101010), but by url segment like this 'my-unique-product-name' (upgrade your server side code)

Now you should have something like this working:

example.com/shop?url=my-unique-product-name

then add to your .htaccess something like this:

RewriteRule ^shop/([A-Za-z0-9-_]+])$ shop.php?url=$1 [L]

It tells your server to process URL-s like example.com/shop/my-unique-product-name in a same way as example.com/shop?url=my-unique-product-name, if that makes sense to you.

Read more about .htaccess URL rewrite here

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda