htaccess anchors?

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

htaccess anchors?

Post by Todd_Z »

Code: Select all

RewriteRule ^Glossary/(.*)$ /Scripts/Glossary.php#$1
Shouldn't http://www.domain.com/Glossary/Word get redirected to http://www.domain.com/Scripts/Glossary.php#Word ?
It works when I plug in the full url, so its not a problem with the code...
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

First of all wrong forum.

I don't see anything in your code that stands out, do other mod_rewrite rules work fine or is it all rewrite rules in general aren't working?
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

They work fine, it seems that the anchors just aren't working when it goes through the htaccess
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

Most likely the '#' character is being interpreted as the begining of a comment.
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

is there a way around that?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Todd_Z wrote:is there a way around that?
Try sticking a backslash immediately before the #
Post Reply