LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Search this Thread
Old 07-02-2007, 08:53 PM   #1
arcow
Member
 
Registered: Jan 2006
Distribution: RedHat linux 9
Posts: 31

Rep: Reputation: 15
i need a rewrite rule!help


i want to do a rewrite rule like follow:

i want to make a similar url http://www.host.com/username/a/b/c/d/e/f/...to /usr/local/apache/webapps/index.php?user=username&a=b&c=d&e=f&...

that's to say the /a/b/c/d/e/f/... is unlimited, maybe /a/b,or maybe /a/b/c/d/ ,or even maybe /a/b/c/d/e/f/g/h/i/j/k/l/...

i tried many times for 2 days,still can't solve it.
how to make the rewrite rule? thank you!
 
Old 07-03-2007, 05:37 AM   #2
FMC
Member
 
Registered: May 2007
Location: So Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
Im not sure, but try something like this:

Code:
.htaccess
RewriteEngine on
RewriteRule ^/(.*) index\.php?original=$1
If somebody try to access "foo.com/a/b/c/d/e/bla.html" it will redirect to index.php and as argument you will receive "a/b/c/d/e/bla.html" so you just need to strip the arguments and thats ready!

[]s, FMC!
 
  


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
iptables: rule with RETURN target just after a rule with ACCEPT target Nerox Linux - Networking 6 09-04-2011 03:33 PM
Rewrite rule with query string in the pattern string basahkuyup Linux - Newbie 2 10-17-2006 02:06 AM
Exception in mod-rewrite rule Boby Programming 0 01-17-2006 07:40 PM
Exim4 rewrite rule for multiple email addresses Hcman Linux - General 3 10-09-2004 02:46 PM
Help me make this rewrite rule in Apache ganninu Linux - General 8 01-07-2004 08:30 AM


All times are GMT -5. The time now is 01:23 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration