DarqFlare Posted March 29, 2004 Posted March 29, 2004 Hey Mike. Here's an interesting problem for you to decipher. I have the following rewrite rule: >RewriteRule ^/*gamesdirectory/+(.*)\.html$ http://www.omgn.com/gamesdirectory.php?Item_ID=$1 [NE] It doesn't work. Putting in "http://www.omgn.com/gamesdirectory/17.html" gets you to "http://www.omgn.com/gamesdirectory.php17.html?Item_ID=17" However, I have tried replacing the rewrite rule with: >RewriteRule ^/*gamesdirector/+(.*)\.html$ http://www.omgn.com/gamesdirectory.php?Item_ID=$1 [NE] Using the address without the ending 'y' works. I have modified that thing all over the place and they all work: but using the full "gamesdirectory" doesn't. Ideas? Quote
MikeJ Posted March 30, 2004 Posted March 30, 2004 I don't really see any issue with the first rewrite rule. I took your rewrite rule and tried it and it works just fine for me. I created a .php file just to output some info on the call: >.htaccess: RewriteEngine On RewriteRule ^/*gamesdirectory/+(.*)\.html$ http://www.testmonkey.ws/gamesdirectory.php?Item_ID=$1 [NE] Requested URL: /gamesdirectory/17.html File actually served: /gamesdirectory.php Arguments Passed: Item_ID=17 For the moment I have it still available if you want to try it yourself. http://testmonkey.ws/gamesdirectory/25.html Change the 25 to whatever. For reference, this is my gamesdirectory.php contents: ><html> <body> .htaccess: <hr> <pre> <?php include('.htaccess'); ?> </pre> <hr> <p> <?php print("Requested URL: ".$REQUEST_URI."<br>File actually served: ".$PHP_SELF."<br>Arguments Passed: ".$QUERY_STRING); ?> </body> </html> Quote
DarqFlare Posted March 30, 2004 Author Posted March 30, 2004 Hm... Welp, not sure on this one. I'll have to research it further, 'cause it surely ain't workin'. Quote
MikeJ Posted March 30, 2004 Posted March 30, 2004 Two questions.... 1. Does it work for you when you hit my URL? 2. Do you have other rules in your .htaccess file? Quote
DarqFlare Posted March 31, 2004 Author Posted March 31, 2004 1) Yes, yours works. 2) I have other rules in my HTACCESS... Including the image protection we ironed out awhile back, I have the following ones right before the gamesdirectory rule, same format: >RewriteRule ^/*news/+(.*)\.html$ http://www.omgn.com/news.php?Item_ID=$1 [NE] RewriteRule ^/*reviews/+(.*)\.html$ http://www.omgn.com/reviews.php?Item_ID=$1 [NE] RewriteRule ^/*editorials/+(.*)\.html$ http://www.omgn.com/editorials.php?Item_ID=$1 [NE] RewriteRule ^/*interviews/+(.*)\.html$ http://www.omgn.com/interviews.php?Item_ID=$1 [NE] I'm slowly getting things added to be more search-engine friendly (And making them seem like permanent URLs for my Print/Save/Newsfeeds functions)... Quote
MikeJ Posted March 31, 2004 Posted March 31, 2004 I'd recommend, just to test it, removing the other rules to see if somehow you have another rule that's also getting applied. That'll help narrow it down. Quote
DarqFlare Posted April 1, 2004 Author Posted April 1, 2004 (edited) A new interesting development: >RewriteRule ^/*(announcements|news|reviews|editorials|interviews|gamesdirectory)/+(.*)\.html$ http://www.omgn.com/$1.php?Item_ID=$2 [NE] That works for all of the following: http://www.omgn.com/announcements/9.html http://www.omgn.com/news/9.html http://www.omgn.com/reviews/9.html http://www.omgn.com/interviews/8.html http://www.omgn.com/editorials/9.html And not the following: http://www.omgn.com/gamesdirectory/9.html Try them and see... I'm thinking it may be something in my PHP script, but I wouldn't know what... Edited April 1, 2004 by TCH-Robert Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.