Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
htaccess problem - cant access variable
Old 12-05-2005, 03:14 PM htaccess problem - cant access variable
Python's Avatar
Ultra Talker

Latest Blog Post:
A new site is launched
Posts: 374
Trades: 0
Im trying to use ModRewrite in a htaccess file to rewrite a url. Im using the following code:

Code:
RewriteRule ^(tutorials)/(.*)/([0-9]+)/$ /index.php?page=tutorials&cat=$1&id=$2 [nc]
Ok its basically rewriting the URL of index.php?page=tutorials&cat=PHP&id=1 into /tutorials/PHP/1

The problem is that when the cat value is assigned it sort of continues on.. So when I actually echo out $cat in the script then it shows up as: PHP/1 instead of just PHP

This means that I cant get to the id var.

Anyone know a solution?

Thanks
__________________

Please login or register to view this content. Registration is FREE

- Affordable web site design solutions
Python is offline
Reply With Quote
View Public Profile Visit Python's homepage!
 
 
Register now for full access!
Old 12-10-2005, 03:36 PM
Experienced Talker

Posts: 36
Trades: 0
Quote:
^(tutorials)/(.*)/([0-9]+)/$
3 sets of brackets, 3 variables. $1 $2 $3
tress is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to htaccess problem - cant access variable
 

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.40163 seconds with 12 queries