Question

i have .htaccess that works fine with shorty rewriting rules like

RewriteRule   ^blog/(.+)$   blog_post.php?blogSEOBaslik=$1   [L] 

But there is a page about.php which includes subnavigation via <li><a href="#resume"> named anchor. When i apply a rule like:

RewriteRule   ^about/(.+)$   about.php\#$1  [L]

not behave as usual, standart about.php#resume anchor do. How do i use named anchors in url rewriting rules?

Was it helpful?

Solution

Use NE flag for not encoding the resulting URL:

RewriteEngine On
RewriteBase /BAH/

RewriteRule ^about/(.+)$ about.php#$1 [NE,L,R]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top