My url is http://example.com/index.php?pid=software_details&p=18 I want to change my url to http://example.com/software_details/18 . I used .htaccess file to do this but it's not working... please someone help me! thanks in advance...!
My .htaccess code is as bellow:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/([^/]*)/([^/]*) /index.php?pid=$1&p=$2 [L]
</IfModule>
我认为以下规则应该可以满足您的需求:
RewriteRule ^/(.*)/(.*)$ /index.php?pid=$1&p=$2 [R=301,L]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.