.htaccess - Rewrite url with part of it already existing -


i trying rewrite url, should pretty simple can't wrap head around it.

my htaccess file @ moment:

directoryindex rewriteengine  on  #indexes uitzetten options -indexes  #cross site access toestaan header set access-control-allow-origin "*"  header add access-control-allow-headers "origin, x-requested-with, content-type"   #website directoryindex index.php  rewriterule         ^actueel/(.*).html portfolio.php?alias=$1 [l] rewriterule         ^info/(.*).html catlisting.php?alias=$1 [l] rewriterule         ^nieuws/(.*).html nieuws.php?alias=$1 [l] rewriterule         ^(.*).html content.php?alias=$1 [l] 

i using joomla cms, since updating latest version need type out url end @ correct page (i used able type websiteurl/cms have type websiteurl/cms/administrator)

how can rewrite when url ends /cms/ (or /cms) adds /adminitrator @ end?

when try following end in infinite loop:

rewriterule         ^cms cms/administrator [l] 

the problem ^cms is, matches starting cms, cms/administrator. match cms, must anchor @ beginning ^ and @ end $, e.g.

rewriterule ^cms$ cms/administrator [l] 

Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -