Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite to. anchor?

That pesky "#" symbol

         

Josefu

2:38 pm on Jul 24, 2007 (gmt 0)

10+ Year Member



Hello - I'm doing my damndest to get Apache to rewrite url's to include an anchor (for javascript-disabled browsers)... but no luck. I realise that the "#" symbol is seen as "everthing after is a comment to be ignored" by Apache... but is there any way around this? I've tried everything from backslashing to... well, you don't really want to know.

I've also tried a few neat tricks such as getting php to take a page request containing a certain variable and add that variable as an anchor name (the veriable/anchor name is a product number for a product in a catalog page), but having a page request itself is a no-no... I could very well prepare a "redirect header page" where .htaccess would send any url requests containing that variable, and php would in turn redirect with the right page with anchor included... did that make any sense? Anyhow, it works but is overly complicated and bad for browsers/spiders.

Am I missing something? Is there any solution for this at all?

jdMorgan

10:50 pm on Jul 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried 'escaping' the "#" symbol? Like "\#" ?

Jim