Help - Search - Member List - Calendar
Full Version: How to use root URL instead /view
Krazy Letter Forums > Members stuff > Computer Programs > PHPKImageHost
Celson
Hello,

I just installed PHPKImageHost in my http://www.veja-fotos.com

I want a simple, tiny URL so I would love to use http://www.veja-fotos.com/2 instead http://www.veja-fotos.com/view/2

I think I need to change .htaccess in order do to that, but I dont know how to do that. Here is the .htaccess content:

CODE
RewriteEngine On
RewriteRule ^image/(.*).jpeg display.php?id=$1
RewriteRule ^thumb/(.*).jpeg thumbdisplay.php?id=$1
RewriteRule ^view/(.*) viewer.php?id=$1


I must to change the last line.

Can someone help me?

Thanks in advance
Celson
Spaceman3750
Change

RewriteRule ^view/(.*) viewer.php?id=$1

to

RewriteRule ^/(.*) viewer.php?id=$1
Celson
QUOTE(Spaceman3750 @ Jul 16 2006, 01:42 PM)
Change

RewriteRule ^view/(.*) viewer.php?id=$1

to

RewriteRule ^/(.*) viewer.php?id=$1
*



It is not working the way I want yet

I can see the image when I use the url http://www.veja-fotos.com//2

(I must to put 2 slashes)

But I want to use only one slash on there... Like below

http://www.veja-fotos.com/2

is it possible?
Mynck
Change

CODE
RewriteRule ^view/(.*) viewer.php?id=$1


to

CODE
RewriteRule ^(.*) viewer.php?id=$1



Just take out that one slash.


CODE
RewriteRule ^(\d*) viewer.php?id=$1


would work too. This way it's better because it only redirects it if it's a number. Else the people wouldn't be able to get to any of your other files. And that would be bad, since they wouldn't be able to get to the image host upload files.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.