我想访问movies.php?m=Bengali Audio
,但是采用这种格式movies/Bengali Audio
我会编写这些.htaccess
代码,但显示文件未找到,movies.php?m=Bengali Audio
工作正常
RewriteEngine On
# Rewrite for movies.php?m=Bengali Audio
RewriteRule ^movies/([0-9a-zA-Z_-]+'')$ movies.php?m=$1 [NC,L]
答案 0 :(得分:1)
您可以使用此正则表达式模式匹配电影名称中的空格:
Options -MultiViews
RewriteEngine On
# Rewrite for movies.php?m=Bengali Audio
RewriteRule ^movies/([^/]+)/?$ movies.php?m=$1 [NC,L,QSA]