문제

I would like to rewrite my url as the following:

http://test.com/listing?p=2 

to

http://test.com/listing/p/2

Any solutions, please kindly to help me.

도움이 되었습니까?

해결책

Place this code in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On

RewriteRule ^listing/(\w+)/(\d+)/?$ /listing/?$1=$2 [L,QSA,NC]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top