.htaccess http重定向仅更改第一个目录名
我在重定向方面有困难 我有/confs/2014/[month]/[city]/[shortname]/例如:.htaccess http重定向仅更改第一个目录名,.htaccess,apache2,.htaccess,Apache2,我在重定向方面有困难 我有/confs/2014/[month]/[city]/[shortname]/例如: /confs/2014/06/london/icamme/ /confs/2014/09/paris/icadd/ /confs/2014/10/losangles/icamad/ 我有12个月,80个城市,许多短名字,在它们下面有真正的html文件。我想将它们重定向到php sys。Php需要的格式是 /conf/2014/[month]/[city]
/confs/2014/06/london/icamme/
/confs/2014/09/paris/icadd/
/confs/2014/10/losangles/icamad/
我有12个月,80个城市,许多短名字,在它们下面有真正的html文件。我想将它们重定向到php sys。Php需要的格式是
/conf/2014/[month]/[city]/[shortname]/
我在下面试过这个
RewriteRule ^conferences\/2014\/(.*) conference/2014/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?path=$1 [L,QSA]
但是它没有重定向无法获取它,您可以尝试再次解释您的问题吗?什么不起作用?我要求您清楚地解释您的问题:)没有包含
conf
或conf
的重写规则。您希望如何将第一个url重写为第二个url?您也没有任何外部重定向,只有内部重写。外部重定向需要[R]
标志。有关更多信息,请参阅。