0

I have the url https://example.com/directory/index.php?id=name

How can I rewrite for https://example.com/directory/name and open https://example.com/directory/index.php?id=name

Other: https://example.com/directory/othername and open https://example.com/directory/index.php?id=othername

What is the solution in htaccess?

Any help would be gratefully appreciated

  • Look into "php routing". You basically have a single rule in htaccess that says "send all requests that can't be mapped to a file to a single PHP file that will perform custom logic". It is important to know that it is your job to handle this logic, and it is also your job to emit URLs in the fashion that you want them to finally look like. – Chris Haas Oct 04 '22 at 19:11

0 Answers0