![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Aug 2002
Location: The Netherlands, Rotterdam
Posts: 8,965
|
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? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Aug 2002
Location: The Netherlands, Rotterdam
Posts: 8,965
|
bump
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Nov 2002
Posts: 7,761
|
Try this rule:
RewriteRule /gallery.php?id=([0-9]+) /gallery/$1/ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Join Date: Aug 2002
Location: The Netherlands, Rotterdam
Posts: 8,965
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: May 2004
Posts: 1,167
|
did you put:
RewriteEngine on |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Jun 2004
Posts: 133
|
Quote:
Code:
RewriteRule /gallery/([0-9]+)/ /gallery.php?id=$1
__________________
Bright Porn | Webmasters | Free Galleries | Sponsors | Traffic Trades | Hardlinks ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Jun 2004
Posts: 2,049
|
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.. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Aug 2002
Location: The Netherlands, Rotterdam
Posts: 8,965
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |