0

I want to change my website's all route(url) with ending / in .htaccess file. i.e:

http://example.com => http://example.com/
http://example.com/1/id=1 => http://example.com/1/id=1/
http://example.com/pages/mgmg => http://example.com/pages/mgmg/

Pls, I have a little exp in Apache's .htaccess, teach me...

MrWhite
  • 43,179
  • 8
  • 60
  • 84
  • There is so much knowledge here on SO already, if you want to learn, try to make use of it! Search, search, search before posting a question. – Don't Panic Oct 06 '21 at 08:32
  • NB: Your first example is the same URL. There is _always_ a slash at the start of the URL-path (after the hostname), even though this might not be displayed in the browser. – MrWhite Oct 06 '21 at 17:13
  • Do you have an existing `.htaccess` file? Have you tried anything? Presumably you are already correctly linking internally to the canonical URL _with_ a trailing slash? – MrWhite Oct 06 '21 at 17:14

0 Answers0