我想管理我的網站我如何在php中使用.htaccess管理網址?
的URL,現在它的顯示我www.computermall.co.in/product_details.php?prdid=34
,但我想www.computermall.co.in/product_details/34
我該怎麼辦?
我已經嘗試了本
Options +FollowSymlinks -MultiViews
RewriteEngine On
RewriteBase /computermall
# Get the URI-path directly from THE_REQUEST variable
RewriteCond %{THE_REQUEST} ^(GET|HEAD)\s/(.*)\.php [NC]
# Strip the extension and redirect permanently
RewriteRule .* /%2 [R=301,L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.php [NC]
# Map internally to the original resource
RewriteRule ^(.*)$ $1.php [L,QSA]
我也想知道答案.... – Gautam3164
YAA人我已經嘗試了很多,但沒有結果 –