0
我有一個網站,這個結構法mod_rewrite的和網站鏈接結構
的index.php/home.php/profile.php/news.php/photos.php
newsfeed.php - 新聞文章
photo.php - 爲照片
還有用戶名用戶獲得短鏈接,他的側臉像
mysite.com/UserName
我現在正在使用在.htaccess這個代碼重寫用戶名
RewriteEngine on
RewriteOptions MaxRedirects=1
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule .* - [L]
RewriteRule ^([^/]+)/?$ profile.php?u=$1 [L]
現在我要重寫我的所有鏈接是SE-友好這樣
index.php --> index
home.php --> home
photos.php --> photos
videos.php --> videos
newsfeed.php?id=xx --> news/xx
photo.php?id=xx --> photo/xx
所以任何想法的網址嗎?