skyer2000 Posted June 20, 2007 Share Posted June 20, 2007 The following is my htaccess file Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*)/(.*) content.php?category=$1&urlrewrite=$2 [L] RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php What I'm trying to figure out is how to handle page anchors, for example- content.php?category=all&urlrewrite=short#middlepage. How can I go about this? What modifications to the htaccess file? Quote Link to comment Share on other sites More sharing options...
ShogunWarrior Posted June 20, 2007 Share Posted June 20, 2007 Anchors aren't sent to the server, they are only used on the client side. Quote Link to comment Share on other sites More sharing options...
skyer2000 Posted June 21, 2007 Author Share Posted June 21, 2007 Correct, but once the page anchor is clicked, a URL such as /all/short#middle will break the page, and only show everything from the #middle anchor on (everything before it is blank) Quote Link to comment Share on other sites More sharing options...
skyer2000 Posted June 21, 2007 Author Share Posted June 21, 2007 Figured it out, I ended up using http://www.kryogenix.org/code/browser/smoothscroll/ and it worked! Quote Link to comment Share on other sites More sharing options...
skyer2000 Posted June 21, 2007 Author Share Posted June 21, 2007 I modified the code on the smoothscroll to go to an anchor without ever putting the anchor in the URL, for example /all/short. This breaks screenreaders however, which require /all/short#middle. I've noticed pages use URL's such as /all/short/#middle, but I can't figure out how to do that in the htaccess file. Quote Link to comment Share on other sites More sharing options...
skyer2000 Posted June 22, 2007 Author Share Posted June 22, 2007 Any ideas? Quote Link to comment Share on other sites More sharing options...
skyer2000 Posted June 26, 2007 Author Share Posted June 26, 2007 Because its pretty much impossible to explain clearly, and I've yet to find a solution online after constant searching, here is an example of what is happening..... Click on one of the "Quick Links" to see for yourself (the smoothscroll javascript has nothing to do with the problem) http://dev.fansn.com/services/psychiatric I hope someone has an idea of why this is happening! Quote Link to comment Share on other sites More sharing options...
skyer2000 Posted June 26, 2007 Author Share Posted June 26, 2007 Turns out it was a CSS issue, padding-bottom: 1001em; margin-bottom: -1000em; from #leftnav No idea why it would cause that, but its fixed now. 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.