|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
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) ![]() |
|
#4
|
||||
|
||||
|
Try this:
Code:
RewriteEngine on RewriteRule statssig(\d+).jpg statssig.php?uid=$1 |
|
#5
|
|||
|
|||
|
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?
|
|
#6
|
||||
|
||||
|
Nothing better comes to mind.
|
|
#7
|
|||
|
|||
|
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. |
|
#8
|
||||
|
||||
|
Are you sure mod_rewrite is enabled?
|
|
#9
|
|||
|
|||
|
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. |
|
#10
|
||||
|
||||
|
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 |
|
#11
|
|||
|
|||
|
nope :S
and it shud be jpeg, thats what i header it and i saved it as a .jpg |
|
#12
|
||||
|
||||
|
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? |
|
#13
|
|||
|