LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-20-2010, 06:18 AM   #1
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Rep: Reputation: 15
Problem with dynamic url rewrite and redirect in nginx???


how could i rewrite and redirect
Quote:
http://forum.example.com/dispbbs.asp?boardID=110&ID=158256
to
Quote:
http://club.example.com/thread-158256-1-1.html
domain from forum. to club. (red color part)
url rewrite, blue color part is variable

V/R,

gavin

Last edited by gavin2u; 05-20-2010 at 06:20 AM.
 
Old 05-20-2010, 06:23 AM   #2
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Original Poster
Rep: Reputation: 15
In forum.example.com virtual site, I add the configuration section as follows,

Quote:
...
location /dispbbs.asp {
if ($args ~* "^boardid=[0-9]+&id=([0-9]+).*$") {
set $tid $1;
rewrite ^.*$ /thread-$tid-1-1.html break;
}
}
...
rewrite ^(.*) http://club.example.com$1 permanent;
...
However, it does not work as I hope.
 
Old 05-24-2010, 06:52 AM   #3
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Original Poster
Rep: Reputation: 15
Please help.
 
Old 05-27-2010, 11:25 PM   #4
gavin2u
Member
 
Registered: Nov 2007
Location: Beijing, China
Distribution: Any free distro.
Posts: 47

Original Poster
Rep: Reputation: 15
any idea plz. this problem still troubles me a lot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nginx 0.7.65 rewrite url with querystring problem? gavin2u Linux - Server 0 04-07-2010 08:46 PM
nginx redirect error page cbtshare Linux - Server 0 10-10-2009 02:30 PM
Apache rewrite rule help - dynamic url to static page DukeLeto Linux - Software 3 11-12-2008 12:26 PM
Mod rewrite problem .. want a friendly/readable url vikram_cvk Linux - Server 1 08-23-2006 07:18 PM
Apache URL redirect problem kdogksu Linux - Networking 2 03-26-2005 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration