Reputation:
I've just transferred a project of mine to the web and I have a file called "circlecrop.php"
that's located in the root directory of where all the CodeIgniter files are. This php script basicall just makes any image with circlecrop.php?path=img
cropped to a circle, very simple and it works fine locally.
This works perfectly fine locally.
I'm getting the following error:
Failed to load resource: the server responded with a status of 403 (Forbidden)
I can't access circlecrop.php directly even though I've got it set to 777, I haven't anything set within my routes in CodeIgniter I'm not sure it's needed?
Complete htaccess file
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|circlecrop\.php|images|js|profile_pictures|fonts|stylesheets|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
I've done some searching and can't seem to find anything, my only thought is that I need a way to directly access circlecrop.php
and it will work. Any help is greatly appreciated!
Edit: I've updated the url that has the errors, maybe that's more helpful.
Upvotes: 2
Views: 11435
Reputation: 1384
Update your base_url
according to your live host in config.php
$config['base_url'] = 'SET YOUR SITE URL HERE';
config.php
is located in /application/config
Upvotes: 0
Reputation: 1
This worked for me:
I replace .htaccess content by the following:
RewriteEngine on RewriteCond $1 !^(index.php|application/themes|application/theme_path|images|assets|robots.txt) RewriteRule ^(.*)$ index.php/$1 [L]
Upvotes: 0
Reputation: 2386
simply use site_url()
on every link and action instead of base_url()
.
Upvotes: 0
Reputation: 187
You need to include if your website placed on root directory
RewriteBase /
If it place in test folder for example use this.
RewriteBase /test/
Upvotes: 1