SEO friendly URL's with .htaccess

匆匆过客 提交于 2019-12-02 01:25:50

try this

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^photos/(.*)$ test/gallery.asp?id=$1 [L,QSA]

first row is test if it isn't file

second row is test if it isn't directory

third will redirect photos/wildlife?a=true to test/gallery.asp?id=wildlife&a=true

if you don't want to redirect with a=true, just give out QSA ;)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!