RewriteEngine on
RewriteRule ^newest/display/(\d+)$ newest.php?display=$1
RewriteRule ^games/cat/(\d+)/display/(\d+)/page/(\d+)/by/(\d+)/order/(.*)$ games.php?cat=$1&display=$2&page=$3&by=$4&order=$5
Is not working. newest.php doesn't even come up when i try opening that page.I thought you were doing it this way. did you read Leon thread on this?
I hate doing it that way as it is so confusing. I rather using the other way I suggested in that thread.I'm sooooooo ashamed with both of you.
You both should know better than to fill my sacred SSP forum with this PHP nonsense
*tear*
putts my man, it has nothing to do with php
it is a htaccess question which is serverside... QUICK! Move it back!!!
Yah..I know, I read that thread. But I've gotten this far and it's soo easy to change once I've got it setup.
I was getting a 500 internal server error, but I fixed that.
BTW, what does this mean as far as regular expressions go?
.*
It was
.*?
But I removed the question mark in order to get it to work..Match any character (except newline)
* Match 0 or more times
? Match 1 or 0 times
<!-- m --><a class="postlink" href="http://www.perldoc.com/perl5.6.1/pod/perlre.htmlMeh">http://www.perldoc.com/perl5.6.1/pod/perlre.htmlMeh</a><!-- m -->, well that doesn't make since.RewriteRule ^games/cat/([^.]+)/display/([^.]+)/page/([^.]+)/by/([^.]+)/order/([^.]+)/*$ games.php?cat=$1&display=$2&page=$3&by=$4&order=$5
Works for me
I also have a problem with mod_rewrite, please see my post
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=43957http://localhost/gamesite/games/cat/4/display/20/page/1/by/2/order/desc">http://www.htmlforums.com/showthread.ph ... order/desc</a><!-- m -->
Doesn't work :/Sorry, the link doesn't work... <!-- m --><a class="postlink" href="http://localhost/">http://localhost/</a><!-- m -->
Try commenting out this line:
RewriteRule ^newest/display/(\d+)$ newest.php?display=$1
..or putting [L] on the end
nothin, here's what .htaccess looks like
RewriteEngine on
#RewriteRule ^newest/display/(\d+)$ newest.php?display=$1
RewriteRule ^games/cat/([^.]+)/display/([^.]+)/page/([^.]+)/by/([^.]+)/order/([^.]+)/*$ games.php?cat=$1&display=$2&page=$3&by=$4&order=$5 [L]Damn. Take a look at
<!-- m --><a class="postlink" href="http://test.vector-networks.com/php_template/games/cat/4/display/20/page/1/by/2/order/desc">http://test.vector-networks.com/php_tem ... order/desc</a><!-- m -->
Here is my .htaccess (in /php_template/ dir):
RewriteEngine on
RewriteRule ^games/cat/([^.]+)/display/([^.]+)/page/([^.]+)/by/([^.]+)/order/([^.]+)/*$ games.php?cat=$1&display=$2&page=$3&by=$4&order=$5
If it helps. Not sure what else to suggestIt's working!
Only problem is, it's trying to find my css file here
/games/cat/4/display/30/page/1/by/2/order/style.css
when it's in the same directory as games.php
any idea?
It's also trying to find my images in that directory when they're in an images folder.Yep, makes sense.
As far as the browser is concerned the page you are on is
/games/cat/4/display/20/page/1/by/2/order/desc/index.(php/htm..)
which means if you have <img src=http://www.htmlforums.com/archive/index.php/"images/myimg.gif"> the browser will try to find /games/cat/4/display/20/page/1/by/2/order/desc/images/myimg.gif.
I suggest you change your IMG tags to go start from the document root:
<img src=http://www.htmlforums.com/archive/index.php/"/games/images/myimg.gif">
Same goes for the CSS:
<link rel="stylsheet" type="text/css" href=http://www.htmlforums.com/archive/index.php/"/games/style.css">Awesome!
It works great!
I just have to try newest.php but that should be no problem.
Thanks alot!
RewriteRule ^newest/display/(\d+)$ newest.php?display=$1
RewriteRule ^games/cat/(\d+)/display/(\d+)/page/(\d+)/by/(\d+)/order/(.*)$ games.php?cat=$1&display=$2&page=$3&by=$4&order=$5
Is not working. newest.php doesn't even come up when i try opening that page.I thought you were doing it this way. did you read Leon thread on this?
I hate doing it that way as it is so confusing. I rather using the other way I suggested in that thread.I'm sooooooo ashamed with both of you.
You both should know better than to fill my sacred SSP forum with this PHP nonsense
*tear*
putts my man, it has nothing to do with php
it is a htaccess question which is serverside... QUICK! Move it back!!!
Yah..I know, I read that thread. But I've gotten this far and it's soo easy to change once I've got it setup.
I was getting a 500 internal server error, but I fixed that.
BTW, what does this mean as far as regular expressions go?
.*
It was
.*?
But I removed the question mark in order to get it to work..Match any character (except newline)
* Match 0 or more times
? Match 1 or 0 times
<!-- m --><a class="postlink" href="http://www.perldoc.com/perl5.6.1/pod/perlre.htmlMeh">http://www.perldoc.com/perl5.6.1/pod/perlre.htmlMeh</a><!-- m -->, well that doesn't make since.RewriteRule ^games/cat/([^.]+)/display/([^.]+)/page/([^.]+)/by/([^.]+)/order/([^.]+)/*$ games.php?cat=$1&display=$2&page=$3&by=$4&order=$5
Works for me
I also have a problem with mod_rewrite, please see my post
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=43957http://localhost/gamesite/games/cat/4/display/20/page/1/by/2/order/desc">http://www.htmlforums.com/showthread.ph ... order/desc</a><!-- m -->
Doesn't work :/Sorry, the link doesn't work... <!-- m --><a class="postlink" href="http://localhost/">http://localhost/</a><!-- m -->
Try commenting out this line:
RewriteRule ^newest/display/(\d+)$ newest.php?display=$1
..or putting [L] on the end
nothin, here's what .htaccess looks like
RewriteEngine on
#RewriteRule ^newest/display/(\d+)$ newest.php?display=$1
RewriteRule ^games/cat/([^.]+)/display/([^.]+)/page/([^.]+)/by/([^.]+)/order/([^.]+)/*$ games.php?cat=$1&display=$2&page=$3&by=$4&order=$5 [L]Damn. Take a look at
<!-- m --><a class="postlink" href="http://test.vector-networks.com/php_template/games/cat/4/display/20/page/1/by/2/order/desc">http://test.vector-networks.com/php_tem ... order/desc</a><!-- m -->
Here is my .htaccess (in /php_template/ dir):
RewriteEngine on
RewriteRule ^games/cat/([^.]+)/display/([^.]+)/page/([^.]+)/by/([^.]+)/order/([^.]+)/*$ games.php?cat=$1&display=$2&page=$3&by=$4&order=$5
If it helps. Not sure what else to suggestIt's working!
Only problem is, it's trying to find my css file here
/games/cat/4/display/30/page/1/by/2/order/style.css
when it's in the same directory as games.php
any idea?
It's also trying to find my images in that directory when they're in an images folder.Yep, makes sense.
As far as the browser is concerned the page you are on is
/games/cat/4/display/20/page/1/by/2/order/desc/index.(php/htm..)
which means if you have <img src=http://www.htmlforums.com/archive/index.php/"images/myimg.gif"> the browser will try to find /games/cat/4/display/20/page/1/by/2/order/desc/images/myimg.gif.
I suggest you change your IMG tags to go start from the document root:
<img src=http://www.htmlforums.com/archive/index.php/"/games/images/myimg.gif">
Same goes for the CSS:
<link rel="stylsheet" type="text/css" href=http://www.htmlforums.com/archive/index.php/"/games/style.css">Awesome!
It works great!
I just have to try newest.php but that should be no problem.
Thanks alot!