我尝试了很多使用可用示例(.htaccess指令)的组合,但无法达到我想要的效果。问题是...使用.htaccess代码从一个url中删除url参数
我实际的URL是 http://localhost/smon2/custsms/index.php?p_mob=9886419001
我要的是 http://localhost/smon2/custsms/
请帮我在wrinting的.htaccess代码行。 感谢
我很少以下项目的尝试......
RewriteEngine On
RewriteCond %{QUERY_STRING} ^p_mob=1$
RewriteRule (.*) $1? [R=permanent]
RewriteEngine On
RewriteCond %{QUERY_STRING} "p_mob=" [NC]
RewriteRule (.*) /$1? [R=301,L]
RewriteEngine On
RewriteRule ^/custsms/%{QUERY_STRING}/?$ http : //localhost/smon2/custsms/ [NC,L]
什么都没有工作。请帮忙。
@anubhava在问题本身添加的代码。将注释部分格式化为不可读的块。 – Shortreminders
你能澄清你在这里试图达到什么 - 为什么不简单地使用URL'http:// localhost/smon2/custsms /'? –
好的,这个.htaccess位于哪里?它在'/ smon2 /'目录下吗? – anubhava