Guest Deleted Posted August 30, 2013 Share Posted August 30, 2013 I have a site that is on both a local and remote host. On the remote host, the images show up fine. On the local they only show up if I comment this out of my .htaccess: RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC] Both versions of the site use virtually the same .htaccess file. Why is it only causing a problem on the local host? Other Info: -Remote server is linux, local is windows -Don't know what server software remote uses, local uses xampp -Both sites are using the CodeIgniter framework Thanks in advance! Link to comment Share on other sites More sharing options...
HartleySan Posted August 30, 2013 Share Posted August 30, 2013 I would guess that it's because of the backslash (\). If you're in a Windows environment for your localhost, then the rewrite rule might take effect, but it won't on a public server, which is likely running a flavor of Linux/UNIX. To be honest, I really don't know though. Link to comment Share on other sites More sharing options...
Antonio Conte Posted August 30, 2013 Share Posted August 30, 2013 This is my .htaccess for Codeigniter: RewriteEngine on RewriteCond $1 !^(index\.php|images|assets|uploads|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] It routes everything to index.php (remote index.php in CI config) but ignores the folders images, assets and uploads. Give it a shot. 1 Link to comment Share on other sites More sharing options...
Guest Deleted Posted September 1, 2013 Share Posted September 1, 2013 I finally figured it out. It was messing up because of the lines immediately before. They were similar to this: RewriteCond %{HTTP_REFERER} !^http://mysite.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://mysite.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mysite.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.mysite.com$ [NC] I changed them all the "mysite.com"* to "localhost". It seems to be working pretty well now. *Not my real domain name. PM me if you really, really want to know it. 1 Link to comment Share on other sites More sharing options...
Recommended Posts