Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 11-18-2009, 10:52 AM   #1
Dan Neece
War Room Member
 
danmart's Avatar
 
Join Date: Jan 2008
Location: Phoenix,Arizona, USA.
Posts: 79
Thanks: 7
Thanked 5 Times in 5 Posts
Default httaccess question

is there a way to pass two variables thrugh a httaccess rdirect? I want to do something like somesite.com/go/1003/somethingelse to translate to go.php?var1=1003&var2=somethingelse.
If there is no /1003/ then var1 would = blank...

Anyone know how to do this?

Dan

Special Pricing on the Ultimate Marketing Package
http://www.warriorforum.com/warrior-...marketing.html
danmart is offline   Reply With Quote
Old 11-19-2009, 02:38 AM   #2
JROX.COM
War Room Member
 
Ryan Roxas's Avatar
 
Join Date: Nov 2003
Location: Las Vegas, NV
Posts: 10
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Default Re: httaccess question

you should be able to do that with mod_rewrite:

Start Rewriting : mod_rewrite tutorial

Ryan Roxas is offline   Reply With Quote
Old 11-19-2009, 08:19 PM   #3
Warrior Member
 
Join Date: Nov 2009
Posts: 6
Thanks: 0
Thanked 2 Times in 2 Posts
Default Re: httaccess question

Try:

Code:
<IfModule mod_rewrite.c>
    # Sets User Groups and Login URL
    Options +FollowSymlinks All -Indexes
    RewriteEngine On
    RewriteBase /

    # Causes every request to run through your-script.php
    RewriteRule (.*)$ your-script.php?%{QUERY_STRING} [L]
</IfModule>
in your php check out the array $_SERVER
SecureWeb is offline   Reply With Quote
Old 11-19-2009, 08:42 PM   #4
PHP Programmer
 
m4rx's Avatar
 
Join Date: Nov 2009
Location: /dev/null
Posts: 136
Thanks: 5
Thanked 12 Times in 12 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile  View Member's YouTube Profile
Contact Info
Send a message via Skype™ to m4rx
Default Re: httaccess question

If you want a wonderful tutorial on mod_rewrite, you need to see .htaccess tricks and tips.. part two: url rewriting with mod rewrite.

Learned alot from this guy, and I know you will learn alot too.

--m4rx

We are what we repeatedly do. Excellence, then, is not an act, but a HABIT. ~Aristotle
Bored. Check out my blog.
m4rx is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
httaccess, question

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 09:41 PM.