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
https://forums.phpfreaks.com/topic/53222-solved-wwwmysitecomsome-number-goes-here/
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 :)

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.