I'm a .htaccess nOOb, but I think this is the best way to do it.
I need to make wordpress change the '/' into '#' in the url. The structure goes like:
<a href="http://thewebsite/pageid/sub_pageid" rel="nofollow">http://thewebsite/pageid/sub_pageid</a> and the desired effect would be <a href="http://thewebsite/pagid#sub_pageid" rel="nofollow">http://thewebsite/pagid#sub_pageid</a> . I've tried few rules I found on-line, but each one of them have failed. I believe its because I have those rules applied to it. There is only one page I have subpages for and it's the only one that needs rewriting. After the redirect I want jquery to scroll down to the anchor.
I've tried RewriteRule ^page/ page# [NE] but I've failed. I've tried many others, but no effect. Hope someone had this problem before and just knows, or can explain why I fail.
Thanks!
I need to make wordpress change the '/' into '#' in the url. The structure goes like:
<a href="http://thewebsite/pageid/sub_pageid" rel="nofollow">http://thewebsite/pageid/sub_pageid</a> and the desired effect would be <a href="http://thewebsite/pagid#sub_pageid" rel="nofollow">http://thewebsite/pagid#sub_pageid</a> . I've tried few rules I found on-line, but each one of them have failed. I believe its because I have those rules applied to it. There is only one page I have subpages for and it's the only one that needs rewriting. After the redirect I want jquery to scroll down to the anchor.
Code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /thewebsite/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /thewebsite/index.php
</IfModule>
# END WordPress
I've tried RewriteRule ^page/ page# [NE] but I've failed. I've tried many others, but no effect. Hope someone had this problem before and just knows, or can explain why I fail.
Thanks!