nobodyk Posted April 9, 2010 Share Posted April 9, 2010 If the user goes to thumb-231313.jpg it takes them to index.php?v=$1 rule Any thoughts? RewriteEngine on RewriteCond %{HTTP_HOST} !^uploadpic\.org$ [NC] RewriteRule ^(.*)$ http://uploadpic.org/$1 [QSA,L,R=301] AddType application/x-httpd-php .html php_flag register_globals on RewriteRule ^thumb-(.*).jpg$ view-image.html?img=$1&w=160&h=160 [QSA] RewriteRule ^showpic-(.*)/(.*)$ view-pic.html?img=$1 [QSA] RewriteRule ^download-(.*)/(.*)$ view-pic-original.html?img=$1&dl=1 [QSA] RewriteRule ^showoriginal-(.*)/(.*)$ view-pic-original.html?img=$1 [QSA] RewriteRule ^([^/]*)\.html$ /index.php?v=$1 [L] Quote Link to comment https://forums.phpfreaks.com/topic/198084-whats-wrong-with-these-rules/ Share on other sites More sharing options...
alex3 Posted April 9, 2010 Share Posted April 9, 2010 It would appear that because you're rewriting all traffic to .html files to index.php, you're rewriting the image to the html file, and then this is being rewritten to the php file, per the last RewriteRule. If you're saying this behaviour is unwanted, try using the last rule flag [L]. Quote Link to comment https://forums.phpfreaks.com/topic/198084-whats-wrong-with-these-rules/#findComment-1039349 Share on other sites More sharing options...
cags Posted April 14, 2010 Share Posted April 14, 2010 As alex3 has correctly identified, the problem is that your rewritten address matches another pattern further down the page (the last one). The solution offered should have fixed this issue. If the problem is indeed solved can you please mark the topic 'Solved' using the 'Mark Solved' button located at the bottom left corner of a thread you started. Quote Link to comment https://forums.phpfreaks.com/topic/198084-whats-wrong-with-these-rules/#findComment-1041543 Share on other sites More sharing options...
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.