403 error on moving to new server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: 403 error on moving to new server (/showthread.php?tid=59263) |
403 error on moving to new server - El Forum - 09-12-2013 [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 Any ideas on what's going on here much appreciated! 403 error on moving to new server - El Forum - 09-12-2013 [eluser]sv3tli0[/eluser] Try removing the "~" from folder name.. 403 error on moving to new server - El Forum - 09-12-2013 [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. 403 error on moving to new server - El Forum - 09-12-2013 [eluser]sv3tli0[/eluser] try to set last line at htaccess to: > RewriteRule ^(.*)$ /~test/index.php/$1 [L,QSA] |