.htaccess - SEO Friendly URLs Rewrite Using Htaccess And Mod_Rewrite -


i have used below rewriterule in .htacces file working /page/ndt:rebgearposgm-8630342

<ifmodule mod_rewrite.c> rewriteengine on rewriterule ^page/([a-za-z0-9\-:]+$)$ page.php?partid=$1 </ifmodule> 

but want work /page/ndt:rebgearposgm-8630342.html. have used below rewriterule , giving error 404 .

<ifmodule mod_rewrite.c> rewriteengine on rewriterule ^page/([a-za-z0-9\-:]+$)\.html page.php?partid=$1 </ifmodule> 

any 1 please assist did wrong or other way this. in advance.

you have misplaced $ anchor in regex. use rule:

<ifmodule mod_rewrite.c>      options -multiviews         rewriteengine on     rewriterule ^page/([a-z0-9:-]+)\.html$ page.php?partid=$1 [l,qsa,nc]  </ifmodule> 

Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

Java Web Service Soap fault exception client -

sql - The object name contains more than the maximum number of prefixes. The maximum is 2 -