nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Lighttpd mod_redirect example

This is a discussion on Lighttpd mod_redirect example within the Web servers forums, part of the Mastering Servers category; Hello all, Im new on Nixcraft and i'm french ( sorry for my english ) I try to convert apache ...


Go Back   nixCraft Linux Forum > Mastering Servers > Web servers

Linux answers from nixCraft.


Web servers Discussion on Apache, Nginx and Lighttpd HTTP/web server and configuration issues.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-06-2009, 02:05 AM
Junior Member
User
 
Join Date: Jun 2009
OS: Debian
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jarod is on a distinguished road
Default Lighttpd mod_redirect example

Hello all,

Im new on Nixcraft and i'm french ( sorry for my english )

I try to convert apache redirect to lighttpd :

PHP Code:
RewriteRule ^([0-9]+)-([^_]+).html$  http://www.dom.com/$2.html [R=301,L] 
i try this one :

PHP Code:
url.redirect = (

     
"/^([0-9]+)-\-([^_]+).html$"  => "http://www.dom.com/$2.html",


I want to redirect url like this :

PHP Code:
www.mysite.com/4566-article-title.html 
To

PHP Code:
www.mysite.com/article-title.html 

Can you help me please


Thanks
Reply With Quote
  #2 (permalink)  
Old 04-06-2009, 05:26 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Your regex is not in correct format, try:
PHP Code:
url.redirect = (
   
"^/([0-9]+)-(.+)\.html$" => "/$2.html"

Also, make sure mod_rewrite and mod_redirect activated.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
Reply

Tags
lighttpd , mod_redirect , remove digits from url


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Lighttpd eating more RAM than Apache. rootadmin Web servers 4 04-07-2008 08:35 PM
Lighttpd stoped but php-cgi still running ?? rootadmin Web servers 4 24-06-2008 09:06 PM
lighttpd ProxyPass thunderbirdsei Web servers 0 30-04-2008 10:50 PM
Apache and lighttpd together anjanesh Web servers 4 29-08-2007 05:11 PM
redirect to www in lighttpd muks Web servers 11 02-06-2007 10:55 PM


All times are GMT +5.5. The time now is 07:58 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38