改写php 伪静态显示方法
下面是现在的链接方式.有经过伪静态设置,http://movie.themeses.com/video/o-k9TDx2R4M/GLEE-Auditions-Cory-M...
下面是现在的链接方式.有经过伪静态设置,
http://movie.themeses.com/video/o-k9TDx2R4M/GLEE-Auditions-Cory-Monteith-on-His-Singing-Shower-Scene.html
因为用的人比较多,我想用其它方式改写.
请高手修改.
原.htaccess伪静态代码如下
Options -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#detail page
#RewriteRule ^video/(.*)/(.*).html detail.php?vid=$1
#RewriteRule ^profile/([a-zA-Z0-9]*).html user_profile.php?u=$1
#RewriteRule ^profile/([a-zA-Z0-9]*)/videos.html user_videos.php?u=$1
#RewriteRule ^profile/([a-zA-Z0-9]*)/videos/page([0-9]*).html user_videos.php?u=$1&p=$2
RewriteRule ^feed/(.*).html feed.php?fid=$1
RewriteRule ^video/(.*)/(.*).html detail.php?vid=$1
RewriteRule ^rss/(.*)/page([0-9]*) rss/rss.php?tag=$1&p=$2
RewriteRule ^rss/feed/(.*)/ rss/feed.php?fid=$1
RewriteRule ^profile/([a-zA-Z0-9]*)$ user_profile.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/$ user_profile.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/videos$ user_videos.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/videos/$ user_videos.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/videos/page([0-9]*).html user_videos.php?u=$1&p=$2
RewriteRule ^profile/([a-zA-Z0-9]*)/favorites$ user_favorites.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/favorites/$ user_favorites.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/favorites/page([0-9]*).html user_favorites.php?u=$1&p=$2
RewriteRule ^profile/([a-zA-Z0-9]*)/playlists$ user_playlists.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/playlists/$ user_playlists.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/playlists/page([0-9]*).html user_playlists.php?u=$1&p=$2
RewriteRule ^profile/([a-zA-Z0-9]*)/playlists/([a-zA-Z0-9]*)/(.*)/page([0-9]*).html user_playlists_entry.php?u=$1&lid=$2&p=$4
RewriteRule ^profile/([a-zA-Z0-9]*)/playlists/([a-zA-Z0-9]*)/(.*)/$ user_playlists_entry.php?u=$1&lid=$2
#RewriteRule ^profile/([a-zA-Z0-9]*)/playlists/([a-zA-Z0-9]*)/(.*)$ user_playlists_entry.php?u=$1&lid=$2
#other page, process in list.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.* list.php
</IfModule>
请高手指点,非常感谢. 展开
http://movie.themeses.com/video/o-k9TDx2R4M/GLEE-Auditions-Cory-Monteith-on-His-Singing-Shower-Scene.html
因为用的人比较多,我想用其它方式改写.
请高手修改.
原.htaccess伪静态代码如下
Options -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#detail page
#RewriteRule ^video/(.*)/(.*).html detail.php?vid=$1
#RewriteRule ^profile/([a-zA-Z0-9]*).html user_profile.php?u=$1
#RewriteRule ^profile/([a-zA-Z0-9]*)/videos.html user_videos.php?u=$1
#RewriteRule ^profile/([a-zA-Z0-9]*)/videos/page([0-9]*).html user_videos.php?u=$1&p=$2
RewriteRule ^feed/(.*).html feed.php?fid=$1
RewriteRule ^video/(.*)/(.*).html detail.php?vid=$1
RewriteRule ^rss/(.*)/page([0-9]*) rss/rss.php?tag=$1&p=$2
RewriteRule ^rss/feed/(.*)/ rss/feed.php?fid=$1
RewriteRule ^profile/([a-zA-Z0-9]*)$ user_profile.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/$ user_profile.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/videos$ user_videos.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/videos/$ user_videos.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/videos/page([0-9]*).html user_videos.php?u=$1&p=$2
RewriteRule ^profile/([a-zA-Z0-9]*)/favorites$ user_favorites.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/favorites/$ user_favorites.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/favorites/page([0-9]*).html user_favorites.php?u=$1&p=$2
RewriteRule ^profile/([a-zA-Z0-9]*)/playlists$ user_playlists.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/playlists/$ user_playlists.php?u=$1
RewriteRule ^profile/([a-zA-Z0-9]*)/playlists/page([0-9]*).html user_playlists.php?u=$1&p=$2
RewriteRule ^profile/([a-zA-Z0-9]*)/playlists/([a-zA-Z0-9]*)/(.*)/page([0-9]*).html user_playlists_entry.php?u=$1&lid=$2&p=$4
RewriteRule ^profile/([a-zA-Z0-9]*)/playlists/([a-zA-Z0-9]*)/(.*)/$ user_playlists_entry.php?u=$1&lid=$2
#RewriteRule ^profile/([a-zA-Z0-9]*)/playlists/([a-zA-Z0-9]*)/(.*)$ user_playlists_entry.php?u=$1&lid=$2
#other page, process in list.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.* list.php
</IfModule>
请高手指点,非常感谢. 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询