anchor links and mod_rewrites
Hey Jason
How would I add a 'back to the top' type anchor link on a mod rewritten page?
Cheers
Jamie
Hey Jason
How would I add a 'back to the top' type anchor link on a mod rewritten page?
Cheers
Jamie
I Don't follow, please provide more details.
ok, if i wanted to add a back to top (<a href="#top"></a>) with the anchor <a name="top"></a> at the top of this page http://bit.ly/17dXBtE when you click on the link it takes you to the homepage. I was assuming that because i have set the baseref to allow for mod_rewrite that that was what might be causing this
your link needs to contain the page name as well as the anchor:
<a href="/category/brushes#top">
thats the problem. its a dynamic page thats being rewritten
the use PHP_SELF:
<a href="<?php echo($_SERVER['PHP_SELF']); ?>#top">
thanks Jason... that seems to use the actual filename rather than the rewritten url..have attached image of the resulting url when the anchor link is clicked.
how are you writing the category at the top of the pages:
Section: Brushes
use that variable in the link:
<a href="/category/<variable that writes Brushes>#top">
got it...thanks for helping me along the way!!! :)
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.