我需要Apache .htaccess的帮助
我想将www.abc.com.au/folder1/folder2/file.php?pi=xyz
重定向到以下内容:
www.abc.com.au/folder1/xyz/folder 2/
任何帮助将不胜感激。
答案 0 :(得分:1)
将此代码放入DOCUMENT_ROOT/.htaccess
文件中:
RewriteEngine On
RewriteRule ^(folder1)/([^/]+)/([^/]+)/?$ /$1/$3/file.php?pi=$2 [L,NC,QSA,NE]