GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Mod Rewrite Question (https://gfy.com/showthread.php?t=323506)

johnbosh 07-08-2004 11:09 AM

Mod Rewrite Question
 
Hello!
I have an site where I use links as: http://www.domain.com/gallery.php?id=12

Now I want to let it mod rewrite that it can also be accessed by:
http://www.domain.com/gallery/12/

I heard it could be done with mod rewrite in your .htaccess, I tried many things but I don't get it to work, who can help me?

johnbosh 07-08-2004 11:42 AM

bump

goBigtime 07-08-2004 11:46 AM

Try this rule:

RewriteRule /gallery.php?id=([0-9]+) /gallery/$1/

johnbosh 07-08-2004 02:16 PM

Quote:

Originally posted by goBigtime
Try this rule:

RewriteRule /gallery.php?id=([0-9]+) /gallery/$1/

thx for it, but it does nothin :(

M_M 07-08-2004 02:23 PM

did you put:
RewriteEngine on

dgraf 07-08-2004 02:36 PM

Quote:

Originally posted by goBigtime
Try this rule:

RewriteRule /gallery.php?id=([0-9]+) /gallery/$1/

IMHO it should be -
Code:

RewriteRule /gallery/([0-9]+)/        /gallery.php?id=$1

Tom_PMs 07-08-2004 02:40 PM

Yeah I was just about to post that the original example looks backwards :)

Assuming you want people to link to your dynamic page using a simple url as you said, then flip the parts around as dgraf said..

johnbosh 07-08-2004 02:56 PM

Quote:

Originally posted by M_M
did you put:
RewriteEngine on

Jup:D I try again with the post of dgraf:D


All times are GMT -7. The time now is 01:07 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123