Welcome Guest, Not a member yet? Register   Sign In
403 error on moving to new server
#1

[eluser]Unknown[/eluser]
I have a Codeigniter site that works fine on my local XAMPP server, but now I've moved it to shared hosting I get a 403 forbidden error when I click on any link. The homepage displays fine, but any page with a slug produces the 403 error. E.g.

Code:
http://123.456.789.0/~test/

works fine

Code:
http://123.456.789.0/~test/about-us

produces the 403 error, but weirdly this works:

Code:
http://123.456.789.0/~test/about-us/

My Base Url is set to

Code:
http://123.456.789.0/~test/

My .htaccess looks like this:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt|static)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

Any ideas on what's going on here much appreciated!
#2

[eluser]sv3tli0[/eluser]
Try removing the "~" from folder name..
#3

[eluser]Unknown[/eluser]
Thanks for the reply. Unfortunately this is the temporary URL given to me by the host until the client repoints the nameservers of the permanent URL, so I cannot change it. I.e. http://123.456.789.0/~test/ points to the root (public_html) folder in the server.
#4

[eluser]sv3tli0[/eluser]
try to set last line at htaccess to:


> RewriteRule ^(.*)$ /~test/index.php/$1 [L,QSA]




Theme © iAndrew 2016 - Forum software by © MyBB