Attention: PROnetworks has upgraded our forum from phpbb2 to phpbb3!!

Please head over to our new converted forum at: http://www.pronetworks.org/forums/

This old forum will remain 'read-only' until approximately February 2009. We look forward to seeing you at the new forum!
Author Message
imnuts
PostPosted: Sat Mar 29, 2008 9:03 pm Reply with quote

Support Team
 
 


Joined: 24 Mar 2004
Posts: 14585
Location: Boothwyn, Pennsylvania
I'm not sure if anyone here will be able to help out on this or not, but I'm trying to make a portion of a site i'm building more search friendly, at least partially. To do so, I want to use the rewrite rules of apache to turn a php page into what appears to be a static page. Unfortunately, what I came up with isn't working, so I don't know if it's the rule isn't written properly or the apache server just doesn't like me (which is also possible). The re-write rule is working for wordpress, so I'm thinking that my rule isn't good. What I want to do is take "details.php?rid=#" where the '#' is replaced by a number and convert that url to "details/#", so basically get rid of the ".php?rid=" in the URL that people see. What I have right now is
Code:
RewriteRule /details/(.+) /details.php?rid=$1

Based on the not so good documentation in the apache manual, that should work, but it isn't. So can anyone confirm what I have as the right code for what i want to do or help me fix it?
 
Back to top
jbullard
Jason Bullard
PostPosted: Sun Mar 30, 2008 2:02 am Reply with quote

VP - Software
 
 


Joined: 06 Jun 2004
Posts: 3304
Location: Utah
Try this

Code:

RewriteEngine onRewriteRule ^details/(.*?).html$ /details.php?rid=$1


This will take it and turn it into a static HTML page. I haven't tested it so let me now if it doesn't work. smilenod
 
Back to top
Back to top
Index >> Webmaster Domain & Code Room >> Apache Rewrite Rule

Page 1 of 1

 


Tired of the Ads? Registered users have 80% less adverts.