Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

remove last slash for anchors

Last post 02-04-2008, 5:44 AM by johngood. 0 replies.
Sort Posts: Previous Next
  •  02-04-2008, 5:44 AM 39260

    remove last slash for anchors

    Hello,

     

    I'm using the following URL rewriting rule :  

     

    RewriteEngine On RewriteBase

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.*)$ /index.php/$1[L]

     

    This works really well, but I have a problem when the URL is pointing to an anchored content

    www.mydomain/mypage#myanchor   is rendered as www.mydomain/mypage#myanchor/   <- that last slash I want to remove.

     

    Can someone please help ? 

     

     

View as RSS news feed in XML