自定义index.php问题的Joomla HttAccess重写异常
我试图对Joomla 1.6.3中的默认htaccess做一个例外,因为它为我自己的php脚本提供了一个友好的url 我们的想法是,以下url已经开始工作: www.mysite.com/wrx/system/index.html?参数1=AE23HtySght34P 外部可以这样称呼,但也表现为: www.mysite.com/wrx/system/AE23HtySght34P/ 我放在htaccess中的规则正在工作,但将其恢复为显示带有参数的php 任何帮助都将不胜感激 西蒙 .htaccess:自定义index.php问题的Joomla HttAccess重写异常,php,.htaccess,mod-rewrite,joomla,Php,.htaccess,Mod Rewrite,Joomla,我试图对Joomla 1.6.3中的默认htaccess做一个例外,因为它为我自己的php脚本提供了一个友好的url 我们的想法是,以下url已经开始工作: www.mysite.com/wrx/system/index.html?参数1=AE23HtySght34P 外部可以这样称呼,但也表现为: www.mysite.com/wrx/system/AE23HtySght34P/ 我放在htaccess中的规则正在工作,但将其恢复为显示带有参数的php 任何帮助都将不胜感激 西蒙 .htacc
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F]
RewriteRule ^wrx/system/([A-Za-z0-9-]+)$ /wrx/system/index.php?id_parameter1=$1 [R=301,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
Options+FollowSymLinks
重新启动发动机
RewriteCond%{QUERY\u STRING}base64\u encode[^(]*\([^)]*\)[或]
重写cond%{QUERY_STRING}(|%3E)[NC,或]
重写条件%{QUERY\u STRING}全局(|\[|\%[0-9A-Z]{0,2})[或]
重写条件%{QUERY\u STRING}\u请求(|\[|\%[0-9A-Z]{0,2})
重写规则。*index.php[F]
重写规则^wrx/system/([A-Za-z0-9-]+)$/wrx/system/index.php?id_参数1=$1[R=301,L]
重写规则。*-[E=HTTP\U授权:%{HTTP:AUTHORIZATION}]
重写cond%{REQUEST_URI}!^/index\.php
重写cond%{REQUEST_URI}/component/|(/[^.]*|\(php | html |提要| pdf | vcf |原始))$[NC]
重写cond%{REQUEST_FILENAME}!-f
重写cond%{REQUEST_FILENAME}!-d
重写规则。*index.php[L]
将此项放在启用重写引擎之后,因此它是第一个被评估的项
RewriteRule /wrx/system/([a-zA-Z0-9]+)$ /wrx/system/index.php?id_parameter1=$1 [L]
- ([a-zA-Z0-9]+)$捕获url结束前的所有(1+)字符(不仅仅是数字)
- [五十] =最后一条规则(对于此评估,将根据规则再次评估重写的url)
谢谢Guido:)我只是在你回答的同时编辑了我的问题。所以它确实像你说的那样工作(已经发现了),但这并不完全是我想要的…如果可能的话,我想保持URL显示如下:www.mysite.com/wrx/system/AE23HtySght34P/@Simon从选项中删除R=301,这涉及http 301重定向(提出新的请求)