Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

EbrahemSamer's avatar

How to remove filename.php part from url and get parameter ? ( PHP native )

Hello,

I have product.php file which get parameter slug ( the slug of the product )

like: www.domain.com/product.php?slug=the-product-slug

I want the same functionality without updating my code

to be like: www.domain.com/the-product-slug

How to remove filename with extension and parameter slug

0 likes
2 replies
redroseamit's avatar
Level 4

you can use .htaccess file to hide any thing.

1 like

Please or to participate in this conversation.