Forcing a trailing slash to a URL after a subdomain rewrite

I'm re-writing a subdomain to a 'folder' - actually a page in wordpress, and this all seems to be working correctly. I don't want the address in the URL bar to change though. Everything works fine unless the user does not put a trailing slash after the page name, then the page is still redirected to the correct URL but the URL in the address bar changesFor example: foo.example.com/barBecomes: public.example.com/foo/barWhere : foo.example.com/bar/ stays at the correct URL in the address bar but shows the redirected page (this is correct)What rule do i need to add to add in a trailing slash if its not sent?The code i have so far is:\[code\]<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /Options +FollowSymlinksRewriteCond %{HTTP_HOST} ^foo\.example\.com$ [NC]RewriteRule ^(.*)$ http://public.example.com/foo/$1 [P]# rules for WordPress ...RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]#####</IfModule>\[/code\]Any help would be fantastic, I'm pretty new to htaccess. Thanks!
 
Back
Top