How can I rewrite www.domain.de/news/news_944836.html to www.domain.de/news_944836.html in Lighttpd? All my Trys didn“t work :(

link|improve this question
feedback

3 Answers

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

if you need that single article to get forwarded.

If everything matching /news/news* should get forwarded, then

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

might do the trick.

link|improve this answer
feedback

Please try this:

url.rewrite-repeat = (
   "^/news/(.*)$" => "$1"
)
link|improve this answer
feedback

hmmh, now i get an http404. the old admin used this chain:

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" ) `

and added at the first line:

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

any ideas?

link|improve this answer
Try commenting the old rewrites for testing. And try rewrite-repeat if there are more rules. – weeheavy Sep 8 '10 at 13:12
feedback

Your Answer

 
or
required, but never shown