Welcome Guest, Not a member yet? Register   Sign In
htaccess doesnt work once uploaded to server


I'm getting this error when i navigate to http://www.mysite.com/pgs/home.

Quote:The requested URL /index.php/home was not found on this server.

But when i navigate to http://www.mysite.com/pgs/index.php/home it works. I know it has something to do with my .htaccess file. It works on my local server.

Here is my .htaccess.

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

Here is my config file:

$config['base_url'] = 'www.mysite.com/pgs';
$config['uri_protocol']    = "AUTO";

Anyone know why this wouldn't be working?

I have check mod rewrite is on.

I used to have the same problem until I found out how to set the "Rewrite base". I don't know if that is what's wrong with your s or not, but I work on a local server and then upload to a production server so on the local one I have something like:

RewriteEngine On

But then on the production server it changes to something like:

RewriteEngine On
RewriteBase /

Hope that helps.

Thanks wowdesignz, it was the RewriteBase /.

Had to set it to:

RewriteBase /mysite/

Because the site is in a sub folder.

Great. I like to help where I can.

Theme © iAndrew 2016 - Forum software by © MyBB