0

I have tried a lot of different rules and conditions, but htaccess just doesn't seem to work for me. I'm not even sure I understand how it works, please help.

I have a URL that looks like advertisements/views/user-list.php I'd like it to look like advertisements/user-list

How would I achieve this? (this is for a localhost based URL)


kur0bane
  • 1
  • 1
  • Welcome to Stack Overflow! If you've got question with a specific issue of yours, which is otherwise common, it works by making use of the existing Q&A material already on site to gain better understanding. Please see the question closed against. – hakre Sep 02 '23 at 09:45
  • I think you are misunderstanding how `.htaccess` works here. `.htaccess` is does not actually "change" the URLs. It allows URLs - that you have already changed in your application - to work. In other words, your application should already be requesting a URL of the form `/advertisements/user-list`. (You can implement a redirect in `.htaccess` to "change" the URL for the benefit of maintaining SEO, but that is secondary to actually getting the new URL to "work".) – MrWhite Sep 02 '23 at 18:37

0 Answers0