.htaccess - dynamic to static url AND removing the dynamic -


i want change alle dynamic url's static ones, after rewriting dynamic url's still responding/available.

what did =>

i found tool seo: http://www.webconfs.com/url-rewriting-tool.php

i entered this: .../filmdetails.html?var=ich_einfach_unverbesserlich_ii

then put .htaccess this:

rewriteengine on options +followsymlinks rewriterule ^filmdetails/(.*)/$ filmdetails.html?var=$1 

works, got problem: url still available , should not be: .../filmdetails.html?var=ich_einfach_unverbesserlich_ii

how rid of dynamic url's?

your rule rewrites nicer looking url 1 query string. rules work "pattern" -> "target" way, mapping won't magically work other way. you'll have create separate rule in order redirect browser:

rewritecond %{the_request} ^(get|head)\ /filmdetails\.html\?var=([^&\ ]+)&?([^\ ]*) rewriterule ^ /filmdetails/%2/?%3 [l,r=301] 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -