Search code examples
phpapache.htaccesscodeigniterhttp-status-code-403

CodeIgniter fresh copy works over LAN, but gets 403 over WAN


I'm starting a new CodeIgniter project, so I grabbed a fresh copy of version 2.1, and unarchived it to my local Apache root. I set up config.php and tested the site from localhost and another machine via the computer's LAN IP, and it worked as expected.

I also have my router forward WAN port 443 to port 80 on my server machine, so that I can access my Apache server from school (via wan_ip:443). This usually works fine, but when I try access my new CodeIgniter copy, I get a 403 Forbidden page.

I can still access all other sub-folders on my Apache server via WAN, including other, older, CodeIgniter projects.

There is no .htaccess file in the root of the fresh copy. I tried chmod-ing 755 and 777 recursively, but with no change.

Anybody have any idea what could be causing this? I've done quite a few CodeIgniter projects, and I've never had this issue.


Solution

  • Turns out it was an Apache issue. I created an .htaccess file and added "Allow from all" to it, and now it works. I'm not sure why I needed to do that since I could access all my other Apache directories over WAN just fine, but it worked.