javascript - RewriteRule with url params -
i know there's thousand duplicate posts this, nothing has worked me far.
i'm trying use rewrite rule transform /articulo.html?id=friendly-url
/articulo/friendly-url
this i've used in .htaccess without success:
rewriteengine on rewriterule ^articulo/(.*)$ /articulo.html?id=$1 [l]
edit:
this js looks id param:
var geturlparameter = function geturlparameter(sparam) { var spageurl = decodeuricomponent(window.location.search.substring(1)), surlvariables = spageurl.split('&'), sparametername, i; console.warn(spageurl); console.warn(surlvariables); (i = 0; < surlvariables.length; i++) { sparametername = surlvariables[i].split('='); if (sparametername[0] === sparam) { return sparametername[1] === undefined ? true : sparametername[1]; } } };
try this,
options -multiviews rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^articulo/(.*)$ articulo.html?id=$1 [l]
Comments
Post a Comment