Jump to content

[SOLVED] Rewrite and Page Anchors


skyer2000

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.