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 help (code) (https://gfy.com/showthread.php?t=615706)

fris 05-30-2006 06:03 AM

mod rewrite help (code)
 
on one of my sites, i am trying to figure out why its not working.

www.dailybs.com

here is an example of a media

http://www.dailybs.com/media/1/chicken-chowmein/

which doesnt work but

http://www.dailybs.com/media.php?id=1 does

any help is grateful


here is the mod rewrite code

RewriteEngine on
RewriteBase /
RewriteRule ^\.htaccess$ - [F]
RewriteRule ^trades/([0-9]+)\/*$ trades.php?id=$1
RewriteRule ^trades\/*$ trades.php
RewriteRule ^submit\/*$ submit.php
RewriteRule ^all-media/([0-9]+)\/*$ index.php?page=$1&view=media
RewriteRule ^send/([0-9]+)\/*$ send.php?id=$1
RewriteRule ^animations\/*$ index.php?cat=1&view=media
RewriteRule ^games\/*$ index.php?cat=2&view=media
RewriteRule ^videos\/*$ index.php?cat=4&view=media
RewriteRule ^pictures\/*$ index.php?cat=5&view=media
RewriteRule ^media/([0-9]+)/([^/]+)\/*$ media.php?id=$1&view=media
RewriteRule ^comments/([0-9]+)\/*$ comments.php?id=$1
RewriteRule ^rate/([0-9]+)/([1-5])\/*$ index.php?id=$1&rating=$2
RewriteRule ^contact\/*$ contact.php

psili 05-30-2006 06:06 AM

I can spend all day trying to get a mod_rewrite regex working, so here's just a quick guess:

instead of:
^media/([0-9]+)/([^/]+)\/*$ media.php?id=$1&view=media

did you try:
^media/([0-9]+)/([^/]+)\/*$ media.php?id=$2&view=media

matching against "$2". I think $1 is the first match, which is the entire expression, but I could be wrong. Also, have you tried tailing the logs and the mod_rewrite log files for help ?


All times are GMT -7. The time now is 08:02 AM.

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