Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 :(

share|improve this question
add comment

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.

share|improve this answer
add comment

Please try this:

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

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?

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.