Forum Moderators: phranque
The htaccess file I'm using contains this:
rewriteEngine on
RewriteBase /
RewriteRule ^\/(\d+)\/World-Map-(.*)\.png$ http://www.example.com/Generators/World_Map_Generator/map.php/World-Map-$2_$1.png [L]
RewriteRule ^World-Map-(.*)_(.*)\.png$ http://www.example.com/Generators/World_Map_Generator/map.php/World-Map-$1_$2.png [L]
An example of a image URL that should work:
http://www.example.com/Generators/World_Map_Generator/World-Map-1_685891.png
If you manually put in the page like the htaccess should direct it to, you'll see the image:
http://www.example.com/Generators/World_Map_Generator/map.php/World-Map-1_685891.png
So for some reason, the htaccess isn't working since going to php5 and I have no idea why. I get an blank page with just, "No input file specified".
Can anyone give me a hand with this please?
[edited by: jdMorgan at 6:09 pm (utc) on Nov. 1, 2007]
[edit reason] No URLs, please. See TOS. [/edit]
It is not necessary to escape "/" slashes in mod_rewrite patterns, and several of your patterns use ".*" which is both ambiguous and (therefore) inefficient to process. Also, support for "PERL-style" regular-expressions tokens like "\d" is not universal. Therefore, I'd suggest the following changes:
RewriteEngine on
RewriteBase /
RewriteRule ^([0-9]+)/World-Map-([^.]+)\.png$ http://www.example.com/Generators/World_Map_Generator/map.php/World-Map-$2_$1.png [L]
RewriteRule ^World-Map-([^_]+)_([^.]+)\.png$ http://www.example.com/Generators/World_Map_Generator/map.php/World-Map-$1_$2.png [L]
RewriteCond %{REQUEST_URI} !/map\.php/
However, your first stop with this kind of problem should be the server error logs? Is there anything useful in there?
Jim
I did try what you suggested and it didn't work. I don't have anything in my error log for this either to help out. Even with your changes, I keep getting: "No input file specified."
As for the location of the htaccess file, it's located in the World_Map_Generator folder.
This was working just fine before moving to php5 and has worked for close to a year without a problem. I don't know if the allow_url_includes php has anything to do with it as that's the reason I moved to php5 to disable that feature but I can't see it causing this problem with an htaccess file.
Do you have something else for me to try?
It was previously php4 and was upgraded to php 5.2.4 because of an exploit on a script that php5 isn't. It has to do with the allow remote url includes which is turned off in php5 for me.
Apache is 1.3.39
It was done by Platinum server management and should have been a server wide update.
*If* you are using AcceptPathInfo, make sure that that setting is still "on". This would likely be the case unless you have further RewruteRules that parse your URLs like
www.example.com/Generators/World_Map_Generator/map.php/World-Map-$1_$2.png
and convert them to a form such as
www.example.com/Generators/World_Map_Generator/map.php?image=World-Map-$1_$2.png
Jim