Hello, Is there a way to redirect "http://example.com" to "http://example.com/" using .htaccess? The request URL for both of them is /. Is there a way to force the trailing slash for the root directory of my site?
as far as I know that would be default behavior of an apache - to internally redirect to / if slash is missing on a folder. since this redirect is additional work for apache it normally is better to have links to your site already with a url with trailing / otherwise I am usure why you want .htaccess do what apache does by default
The user must make the following request in both cases: GET [B]/[/B] HTTP/1.1 Host: www.mydomain.com Code (markup):