Page 1 of 1

htaccess anchors?

Posted: Wed Jul 27, 2005 6:31 pm
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...

Posted: Wed Jul 27, 2005 6:36 pm
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?

Posted: Wed Jul 27, 2005 11:41 pm
by Todd_Z
They work fine, it seems that the anchors just aren't working when it goes through the htaccess

Posted: Thu Jul 28, 2005 12:51 am
by redmonkey
Most likely the '#' character is being interpreted as the begining of a comment.

Posted: Thu Jul 28, 2005 12:49 pm
by Todd_Z
is there a way around that?

Posted: Thu Jul 28, 2005 1:24 pm
by Chris Corbyn
Todd_Z wrote:is there a way around that?
Try sticking a backslash immediately before the #