Query string rewriting using .htaccess

后端 未结 2 885
-上瘾入骨i
-上瘾入骨i 2021-01-23 16:07

i am trying to rewrite a URL for SEO purpose.

The old URL is:

http://www.domain.net/index.php?p=beer

The new URL should be:

<         


        
2条回答
  •  甜味超标
    2021-01-23 16:37

    Have you tried this:?

    ^([^/\.]+)\/?$
    

    Otherwise I would try the .htacces without the other stuff.

    Just:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^([^/\.]+)\/?$ index.php?p=$1
    

提交回复
热议问题