我正在使用PHP Codigniter开发网页, 我想让我的网址看起来更好, 例如,我想要这个URL:
Sub CopyUnique()
Dim s1 As Worksheet, s2 As Worksheet
Set s1 = Sheets("Main")
Set s2 = Sheets("Count")
s1.Range("B:B").SpecialCells(xlCellTypeConstants).Copy
With s2
.Range("A1").PasteSpecial xlPasteValues
.Range("A1", .Cells(.Rows.count, 1).End(xlUp)).RemoveDuplicates Columns:=1, Header:=xlNo
End With
End Sub
看起来像这样:
http://localhost/mlotfy/freelancing/quiz/view_quiz?id=25
我在.htaccess文件中尝试了这个重写规则,但没有解决(找不到404页)
http://localhost/mlotfy/freelancing/quiz/25
答案 0 :(得分:5)
试试这个
RewriteRule ^quiz/([0-9]+)/?$ quiz/view_quiz?id=$1 [NC,QSA,L]