Current location: Hot Scripts Forums » Other Discussions » Web Servers » Some rewrite rule help, getting variable


Some rewrite rule help, getting variable

Reply
  #1 (permalink)  
Old 06-02-09, 07:06 AM
wwfc_barmy_army wwfc_barmy_army is offline
Newbie Coder
 
Join Date: Jan 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Some rewrite rule help, getting variable

Hello.

I have this rewrite code:

Code:
RewriteEngine On
RewriteRule ^(.+)$ index.php?do=$1
RewriteRule ^(.+)/$ index.php?do=$1
The 'do' variable holds a domain name. So it would be something like:
http://mydomain.com/domain.com

So domain.com is what I am after.

It goes to index.php ok, no problems there. BUT when i try to get the 'do' variable it says it's 'index.php'.

Any ideas?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
getting a variable to display another variable? frobak PHP 2 03-17-09 04:23 PM
[SOLVED] Multiple variable rewrite Deansatch Web Servers 1 02-19-09 03:20 PM
Reading XML anupamsr PHP 13 04-19-08 01:57 PM
templating problem (how to forward file name as a variable) skyrat PHP 0 09-11-05 09:27 PM
using variable variables with multiple variables for parts of the name harlock PHP 7 07-26-05 08:35 PM


All times are GMT -5. The time now is 01:39 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.