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)

http://httpd.apache.org/docs/2.2/rewrite/flags.html#flag_ne


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -