Jump to content

URL always end with a forward slash


squiblo

Recommended Posts

I want all my URLs to end with a forward slash (/) e.g.

 

www.website.com => www.website.com/

www.website.com/folder => www.webiste.com/folder/

www.website.com/?u=123 =? www.website.com/?u=123/

 

This is my current .htaccess file...

 

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .* - [L]
RewriteRule ^profile/(.*)$ profile.php?u=$1 [NC]

 

But I don't know how to modify it so the current Rewrite rule will work with the forward slash rule I want. Please help!

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/255763-url-always-end-with-a-forward-slash/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.