Php 为什么.htaccess文件的代码不起作用
我想将以下动态URL修改为SEF URL: URL:URL应如下所示: 请帮帮我。。。。。这是我的密码。。。我正在使用godaddy服务器Php 为什么.htaccess文件的代码不起作用,php,.htaccess,Php,.htaccess,我想将以下动态URL修改为SEF URL: URL:URL应如下所示: 请帮帮我。。。。。这是我的密码。。。我正在使用godaddy服务器 Options -MultiViews ## Mod_rewrite in use. RewriteEngine On # Block out any script trying to base64_encode data within the URL. RewriteCond %{QUERY_STRING} base64_encode[^(]*\([
Options -MultiViews
## Mod_rewrite in use.
RewriteEngine On
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* movie-details.php [F]
#RewriteBase /
RewriteCond %{REQUEST_URI} !^/movie-details\.php
RewriteRule .* /en/movie-details.php?id=$1 [L]
# Removes index.php from URLs
RewriteCond %{THE_REQUEST} ^GET.*movie-details\.php [NC]
RewriteCond %{REQUEST_URI} !/en/.* [NC]
RewriteRule (.*?)movie-details\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /movie-details.php/$1 [L]
选项-多视图
##Mod_正在使用中重写。
重新启动发动机
#阻止任何试图在URL中对数据进行base64_编码的脚本。
RewriteCond%{QUERY\u STRING}base64\u encode[^(]*\([^)]*\)[或]
#阻止在URL中包含标记的任何脚本。
重写cond%{QUERY_STRING}(|%3E)[NC,或]
#阻止任何试图通过URL设置PHP全局变量的脚本。
重写条件%{QUERY\u STRING}全局(|\[|\%[0-9A-Z]{0,2})[或]
#阻止任何试图通过URL修改_请求变量的脚本。
重写条件%{QUERY\u STRING}\u请求(|\[|\%[0-9A-Z]{0,2})
#返回403禁止标题并显示根主页的内容
重写规则。*movie-details.php[F]
#重写基/
重写cond%{REQUEST_URI}!^/movie details\.php
重写规则。*/en/movie details.php?id=$1[L]
#从URL中删除index.php
RewriteCond%{THE_REQUEST}^GET.*movie details\.php[NC]
RewriteCond%{REQUEST_URI}!/en/*[NC]
重写规则(.*)电影详细信息\.php/*(.*)/$1$2[R=301,NE,L]
#通过站点索引文件指示所有EE web请求
重写cond%{REQUEST_FILENAME}!-f
重写cond%{REQUEST_FILENAME}!-d
重写规则^(.*)$/movie details.php/$1[L]
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^movie/id-([0-9]+)/$ /movie-details.php?id=$1 [QSA,L]