Jump to content

Fix lack of trailing / in urls


scrupul0us

Recommended Posts

I'm trying to fix and issue where navigation to /foo throws a 301 and /foo/ works

 

i found this code:

 

RewriteEngine  on

RewriteBase    /~quux/

RewriteCond    %{REQUEST_FILENAME}  -d

RewriteRule    ^(.+[^/])$          $1/  [R]

 

what do i change the RewriteBase base to to work for my server and would that code go in the <directory /> </directory> declaration?

 

im using linux and my files are served from /etc/www/htdocs/

 

heres my original thread one forum above this: http://www.phpfreaks.com/forums/index.php/topic,126728.0.html

Link to comment
https://forums.phpfreaks.com/topic/38333-fix-lack-of-trailing-in-urls/
Share on other sites

  • 2 weeks later...

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.