Lightttpd 重写

Lightttpd 重写

如何在 Lighttpd 中将 www.domain.de/news/news_944836.html 重写为 www.domain.de/news_944836.html?我所有的尝试都没有成功 :(

答案1

url.rewrite-final = ( 
"^/news/news_944836.html" => "/news_944836.html"
)

如果您需要转发该单篇文章。

如果所有符合 /news/news* 的内容都应该被转发,那么

url.rewrite-final = ( 
"^/news/(.*)$" => "/$1"
)

可能会奏效。

答案2

请尝试以下操作:

url.rewrite-repeat = (
   "^/news/(.*)$" => "$1"
)

答案3

嗯,现在我得到一个 http404。旧管理员使用了这个链:

url.rewrite-once = (

"rss/rss91.xml" => "/index.php?id=35344", "^/(handel/|kanalliste/|typo3|typo3temp/|typo3conf/|img/|css/|uploads/|fileadmin/|t3lib/|robots.txt|clear.gif|apc.php|apc_cache.php)。$” => “$0”, “^/$” => “index.php”, “^/index.php\?.$" => "$0", "^typo3$" => "typo3/index_re.php", ".\?([^.]+)" => "index.php?$1", ".$" => "index.php" ) `

并在第一行添加:

"^/news/(.*)$" => "$1",

有任何想法吗?

相关内容