如何使用.htaccess创建友好的URL?
http://website.com/index.php?ctrl=pelicula&id=0221889http://website.com/index.php?ctrl=pelicula&id=0160399&tab=posters
http://website.com/pelicula/0221889/http://website.com/pelicula/0221889/posters/
http://website.com/pelicula/0221889/the-article-name/http://website.com/pelicula/0221889/the-article-name/posters/
http://stackoverflow.com/questions/3033407/htacces-to-create-friendly-urls-help-needed
http://stackoverflow.com/questions/3033407/just-anything-i-want
编辑:根据我在这里得到的一些答案,我说:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/([^/]+)/([^/]+)/?([^/]*)/?$ index.php?ctrl=$1&id=$2&tab=$3 [QSA,L]</IfModule><IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/(\d+)/([^/]+)/?$ index.php?ctrl=$1&id=$2&tab=$3 [QSA,L]
RewriteRule ^([^/]+)/(\d+)/?$ index.php?ctrl=$1&id=$2 [QSA,L]
RewriteRule ^([^/]+)/?$ index.php?ctrl=$1 [QSA,L]</IfModule>
米琪卡哇伊
忽然笑
随时随地看视频慕课网APP