Rewriting a dynamic url for phpBB

  • 993ti
  • Newbie
  • Newbie
  • 993ti
  • Posts: 12

Post 3+ Months Ago

I'm trying to rewrite a dynamic url to a more search engine friendly url.
I'm using the phpbb SEO mod and did a couple extra rewrites for my site with it.
The url is like this:
dload.php?action=category&cat_id=2
I'm adding this in htaccess:
Code: [ Select ]
RewriteRule ^download-categorie-([0-9]*).* dload.php?action=category&cat_id=$1 [L,NC]

And this in page_header.php:

Code: [ Select ]
"'(?<!/)dload.php?action=category&amp;cat_id=([0-9]*)'",

Code: [ Select ]
"download-categorie-\\1.html",

Pages like portal.php?page=2 are rewritten correctly but somehow it doesn't work with the longer urls.
If i rewrite dload.php to dload.html the url becomes dload.html?action=category&cat_id=2
Any ideas of what i'm doing wrong?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ctrenks
  • Student
  • Student
  • ctrenks
  • Posts: 87

Post 3+ Months Ago

for a simple one check here..
//removed
I can help you out if you use that as I know how it works..
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I'm pretty bad with rewrite rules myself, but the first thing that jumps out at me is your mispelling of category here:

download-categorie
  • 993ti
  • Newbie
  • Newbie
  • 993ti
  • Posts: 12

Post 3+ Months Ago

I wanted it to rewrite to download-categorie but i made some changes.
It works when i use the rewrite directly.

@Ctrenks: I didn't like that one.
I'm using a modified version of craven's SEO mod, also using keywords.
Maybe the rewrite isn't working because the link is generated by the script?
  • Daniel
  • Student
  • Student
  • Daniel
  • Posts: 91

Post 3+ Months Ago

Excuse me ctrents, but that is my mod, please don't modify it and take credit for it, withought asking/e-mailing me prior to you doing so.
Please revert it back to normal on your forum, and I will glady add the change and include your credit for that part.

Rgs
Dan
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Daniel, I removed the link to your mod noted above. However, if you can provide assitance to the OP, I suspect it would be appreciated.
  • ctrenks
  • Student
  • Student
  • ctrenks
  • Posts: 87

Post 3+ Months Ago

i set it back, although at least I made changes to it lol not like this in the google forum here

Mrlinux wrote:
People check this out:
http://outwartips.net/forum/phpbb-modre ... t3382.html
and the tutorial about mod_rewrite:
http://outwartips.net/forum/the-definit ... t3381.html

hope this will not show as a Spam, if yes please delete it.
  • Daniel
  • Student
  • Student
  • Daniel
  • Posts: 91

Post 3+ Months Ago

Thanks ctrenks for changing it back :) And for support on the mod 993yi please ask at the forum

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 5 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.