1
everyone ..在我的友好網址中的案例
我的網址有問題。我重寫我的URL像這個友好的網址。
http://www.lankainstitute.com/1289/Mahesh Jayarathna HTTP/1./?1
但網址的結束這個字符串 「HTTP/1 ./?1」 增加了..
有誰能夠告訴我這是爲什麼???
這是從我的.htaccess文件
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /profiles/tutors/index.php\?tutorCode=([0-9]+)&tutorName=([^&]+)&?([^\ ]+)
RewriteRule ^profiles/tutors/index\.php /%1/%2/?%3 [R=301,L,NE]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([0-9]+)/(.+)/$ /profiles/tutors/index.php?tutorCode=$1&tutorName=$2 [L,QSA]
任何意見是極大的讚賞..
謝謝。
感謝它的工作。但網址'/'結尾添加了這個斜槓。我怎樣才能從我的網址中刪除這個。 (在Tutor Name後面) – ugnuku 2012-08-13 04:30:11
@ user1543817你需要那個,因爲在下面的規則中你特別匹配了一個尾部的斜線:'RewriteRule ^([0-9] +)/(。+)/ $' – 2012-08-13 04:36:35
Jon Lin我不清楚你的評論。你能再次解釋一下嗎...... – ugnuku 2012-08-13 04:51:54