Forum Moderators: phranque
Can some kind sole please help me with a suitable mod_rewwrite command.
I am trying to use 'friendly' url's for a large number of files with dynamic content, but wish to rewrite them to standard '?' parameters to retain the relative links within the pages.
So, we will get calls as follows: reviews09.php/129
Now, I want to convert this to review09.php?P=129
I figured out how to do that. The problem is the two-digit numeric content of the page name (09 in this case). I will have pages from review00.php to review99.php and obviously don't want to write a separate command for each.
Cany anyone help, PLEASE. Thanks in anticipation.
I haven't got any code yet.
I'm looking for a working command line that I can add to .htaccess that would convert calls for [mydomain.com...] to /reviews/review?.php?P=129
I'm afraid I haven't got my head around regular expressions yet. Still stuggling with basic PHP!
Can I explain my problem. I'm using 'friendly' URLs to call various pages. However, this is breaking the relative paths in those pages. For several reasons it is not practical/desirable to change the links to absolute paths. Therefore, as the page request is received, I would like to convert the path to the more conventional '?' parameter URL.
There will potentially be a few hundred pages involved. The thing that is really throwing me is that the page name does contain a either two, or three, variables. I only quoted two above, but I've now remembered that there are three - in the format review01.php, review01a.php, review01b.php, review01c.php, review02.php, etc.
The constant thing is that all pages will be contained in the /reviews subfolder and will be named review?.php. There is just the single parameter that needs to be converted to?P=?
I hope somebody can help. This is driving me nuts since we made all the changes and found the paths bust.