Jump to content

[SOLVED] www.mysite.com/*some number goes here*


Warptweet

Recommended Posts

Okay, I own www.uploadpoints.com, it is an uploading website.

It is designed to be the absolute easiest file, image, and music host ever created. The very front page contains the upload form, and is just immediate service. Right after the file is upload, it gives you a link to the viewing page of the file, image, or music you uploaded.

 

If you upload a file, and the file you uploaded is the 40th file uploaded, it would be www.uploadpoints.com/view.php?id=40.

If you upload a file, and the file you uploaded is the 50th file uploaded, the ?id would =50

 

Now, the way that the viewing page is not the same as the index.php for my normal website means my viewers have to the in www.uploadpoints.com/view.php?id=??? and that can be a very painfully annoying process. Now, my question is, is it possible to simply let users type in www.uploadpoints.com/??? with the ???=the number they typed in, and it will automatically redirect to www.uploadpoints.com/view.php?id=????

 

Example:

You type in www.uploadpoints.com/15

/15 isn't a file, nor an existing directory. It will simply redirect you to...

www.uploadpoints.com/view.php?id=15

Link to comment
Share on other sites

I tried all of your codes, but when I went to something like www.uploadpoints.com/15, it wouldn't take me to www.uploadpoints.com/view.php?id=15

 

Also, if I didn't enter a /??? it wouldn't take me to the main page.

I only want this to happen if there is a number after www.uploadpoints.com, if it is www.uploadpoints.com alone, then I need it to stay that way.

 

Have any ideas how to do this?

Thanks for trying at least :)

Link to comment
Share on other sites

"your help was unneccessary" I'll keep that in mind next time you post a question. in the meantime please mark the thread as solved, and for the benefit of other users you could post the code you found that worked for you if ours didn't for some reason.

Link to comment
Share on other sites

I'm sorry if you took that in a bad way

It wasn't meant as an offence, I usually use the help I receive.

 

It really isn't my fault if your code didn't work, it's the .htaccess codes fault.

 

The code I used was...

RewriteEngine On
RewriteRule ^([A-Za-z0-9-]+)/?$ view.php?id=$1

 

Again, thanks for trying, I was simply stating I found my own way.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.