close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

anchor links and mod_rewrites

Thread began 1/05/2015 8:33 am by Jamie | Last modified 1/07/2015 10:51 am by Jason Byrnes | 590 views | 9 replies |

Jamie

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

Sign in to reply to this post

Jason ByrnesWebAssist

I Don't follow, please provide more details.

Sign in to reply to this post

Jamie

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

Sign in to reply to this post

Jason ByrnesWebAssist

your link needs to contain the page name as well as the anchor:

<a href="/category/brushes#top">

Sign in to reply to this post

Jamie

thats the problem. its a dynamic page thats being rewritten

Sign in to reply to this post

Jason ByrnesWebAssist

the use PHP_SELF:

<a href="<?php echo($_SERVER['PHP_SELF']); ?>#top">

Sign in to reply to this post

Jamie

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.

Sign in to reply to this post

Jason ByrnesWebAssist

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">

Sign in to reply to this post

Jamie

got it...thanks for helping me along the way!!! :)

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

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.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...