To Remove from action file name in url usign php -


hello every 1 new in concept of url rewriting. have url
"http://localhost/htaccess/formname/my-parameter-value"
but want
"http://localhost/htaccess/my-parameter-value"
in advance
here code

#options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on      rewritecond %{the_request} ^[a-z]{3,}\s/+(.*?)(?:\+|%20|\s)+(.+?)\shttp [nc] rewriterule ^ /%1-%2 [l,ne,r=302]  # externally redirect /dir/foo.php?name=123 /dir/foo rewritecond %{the_request} ^get\s([^.]+)\.php\?name=([^&\s]+) [nc]  rewriterule ^ %1/%2? [r,l]       # internally forward /dir/foo/12 /dir/foo.php?name=12 rewritecond %{request_filename} !-d rewritecond %{request_filename}.php -f rewriterule ^(.+?)/([^/]+)?$ $1.php?name=$2 [l,qsa] 


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -