Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 24th, 2008, 12:55 AM
gsquare567 gsquare567 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 394 gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 17 h 34 m 38 sec
Reputation Power: 11
Talking Changin viportals.com/statssig.jpg?uid=1 -> viportals.com/statssig.jpg w/ .htaccess??

i have my site's stats sigs located at

http://www.viportals.com/statssig.jpg?uid=1

however, i do not want people to see other members' uids so they can steal them. how can i change statssig.jpg?uid=1 into statssig.jpg?

i know it has something to do with RewriteRule in .htaccess, but i cannot find out exactly how to use it in this advanced way.

the only thing that will change in the link b/w members is the number at the end, so how would i make .htaccess change a variable? right now i have:
Code:
RewriteEngine on
RewriteRule statssig.jpg statssig.php


here is what i want (i just dont know the syntax for variables in this language which i never knew of before today):
Code:
RewriteEngine on
RewriteRule statssig.jpg statssig.php?uid=(VARIABLE)


any1 know how to work this?

EDIT:
it must also end in .jpg because for forums (like this) it is an invalid file otherwise.

Last edited by gsquare567 : April 24th, 2008 at 01:10 AM.

Reply With Quote
  #2  
Old April 24th, 2008, 01:13 AM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Click here for more information.
 
Join Date: Jul 2004
Location: USA
Posts: 15,807 Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 3 Weeks 3 Days 12 h 21 m 15 sec
Reputation Power: 1477
Huh? What you're asking doesn't make sense. You want to specify a parameter but keep it hidden?

If you want to keep UIDs secret, it sounds like you aren't confident in the security of your login system.

** Thread Moved to Apache Dev Forum **
__________________
Spreading knowledge, one newbie at a time.

Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

IE7: the generation 7 browser new in a world of generation 8 browsers.
Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

Reply With Quote
  #3  
Old April 24th, 2008, 01:18 AM
gsquare567 gsquare567 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 394 gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 17 h 34 m 38 sec
Reputation Power: 11
no i just thought it would be nice if other members could not fake as another member without knowing their exact uid. its actually pretty stupid, scratch that. however, maybe viportals.com/statssig1.jpg would work, if that could be transformed to statssig.php?uid=1.

however, i do need the .jpg at the end, again, for some forums to accept it.

(isnt she a beauty)
__________________

Reply With Quote
  #4  
Old April 24th, 2008, 01:22 AM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Click here for more information.
 
Join Date: Jul 2004
Location: USA
Posts: 15,807 Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 3 Weeks 3 Days 12 h 21 m 15 sec
Reputation Power: 1477
Try this:
Code:
RewriteEngine on
RewriteRule statssig(\d+).jpg statssig.php?uid=$1
Comments on this post
jharnois agrees!

Reply With Quote
  #5  
Old April 24th, 2008, 12:06 PM
gsquare567 gsquare567 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 394 gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 17 h 34 m 38 sec
Reputation Power: 11
wow sick man! ima try that. u know ur .htaccess! do you recommend a better method for this, or is my idea amazing? like statssig1.jpg vs another name?

Reply With Quote
  #6  
Old April 24th, 2008, 01:31 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Click here for more information.
 
Join Date: Jul 2004
Location: USA
Posts: 15,807 Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 3 Weeks 3 Days 12 h 21 m 15 sec
Reputation Power: 1477
Nothing better comes to mind.

Reply With Quote
  #7  
Old April 24th, 2008, 02:25 PM
gsquare567 gsquare567 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 394 gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 17 h 34 m 38 sec
Reputation Power: 11
hrmm getting 404 error.

and why does:
Code:
http://www.viportals.com/statssig.jpg?uid=1

work with the php and
Code:
http://viportals.com/statssig.jpg?uid=1

(without www) only show the image and not the php???

Last edited by gsquare567 : April 24th, 2008 at 02:28 PM.

Reply With Quote
  #8  
Old April 24th, 2008, 02:28 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Click here for more information.
 
Join Date: Jul 2004
Location: USA
Posts: 15,807 Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 3 Weeks 3 Days 12 h 21 m 15 sec
Reputation Power: 1477
Are you sure mod_rewrite is enabled?

Reply With Quote
  #9  
Old April 24th, 2008, 02:29 PM
gsquare567 gsquare567 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 394 gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 17 h 34 m 38 sec
Reputation Power: 11
read above, it should be bcuz it works for the other file (if there is a www, dont know why was hoping you could answer), but here is what i have:
Code:
RewriteEngine on
RewriteRule statssig(\d+).jpg statssig.php?uid=$1


and http://www.viportals.com/statssig1.jpg is what i want to use (not sure if thats what you coded)

so in the .htaccess code, i want (\d+) and $1 to be the same thing, i want the statssig1.jpg to turn into statssig.php?uid=1, and for uid 2 statssig2.jpg -> statssig.php?uid=2

Last edited by gsquare567 : April 24th, 2008 at 02:32 PM.

Reply With Quote
  #10  
Old April 24th, 2008, 02:32 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Click here for more information.
 
Join Date: Jul 2004
Location: USA
Posts: 15,807 Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 3 Weeks 3 Days 12 h 21 m 15 sec
Reputation Power: 1477
By the way, the image is in GIF format, not JPEG format.

I don't see why it would make a difference, but try this:
Code:
RewriteEngine on
RewriteRule statssig(\d+)\.jpg statssig.php?uid=$1

Reply With Quote
  #11  
Old April 24th, 2008, 02:34 PM
gsquare567 gsquare567 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 394 gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 17 h 34 m 38 sec
Reputation Power: 11
nope :S

and it shud be jpeg, thats what i header it and i saved it as a .jpg

Reply With Quote
  #12  
Old April 24th, 2008, 02:34 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Click here for more information.
 
Join Date: Jul 2004
Location: USA
Posts: 15,807 Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 7th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 3 Weeks 3 Days 12 h 21 m 15 sec
Reputation Power: 1477
The parentheses make a matching sub-expression. The "\d" means any numerical digit (0-9). The plus sign means there needs to be one or more of them. The "$1" means the first matching sub-expression.

@Jeremy Any ideas?

Reply With Quote
  #13  
Old April 24th, 2008, 02:37 PM
gsquare567 gsquare567 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 394 gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)gsquare567 User rank is Sergeant (500 - 2000 Reputation Level)