dbx Posted December 29, 2008 Share Posted December 29, 2008 The error page I have added to my site works fine unless I try call a folder than does not exist and don't include a trailing / It's a PHP error page and the browser simply displays the unprocessed code. I have "RewriteBase / " in my .htaccess file which I thought appended a / to the url if it was missing. My hosting company said it's a scripting issue, but I doubt that considering the page is displayed for regular pages and if I include the / Any ideas? Thanks. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted December 29, 2008 Share Posted December 29, 2008 To force a trailing slash at the end of the url use the following rewrite rule: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ http://www.yoursite.com/$1/ [R=301,L] Change http://www.yoursite.com to your actual sites address. Quote Link to comment Share on other sites More sharing options...
dbx Posted December 29, 2008 Author Share Posted December 29, 2008 It didn't work. It added a trailing slash when I tired site.com/index.php but not when i tried site.com/indexd Any ideas? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.