php - How To: URL Rewrite & HTML Link Within Same Page? -
i want user click on link of www.domain.com/how-it-works
my url rewrite is:
rewriterule ^how-it-works/?$ index.php?action=about&link=howitworks [nc]
index.php gets "action" , "link" parameters, , lost...
i using following:
require( template_path . "/about.php" );
this loads about.php template file, want, put "same page link" of: #hiw? #hiw link inside about.php template file.
the #hiw
in url called fragment identifier in html.
supposing using apache, can go (note ne
, r
flags @ end):
rewriterule ^how-it-works/?$ index.php?action=about#hiv [nc,ne,r]
(i took of &link=howitworks
because suppose #hiv
replaces it, if not can put back)
Comments
Post a Comment