Welcome Guest, Not a member yet? Register   Sign In
SOLVED htaccess expert needed. Immediate help please...
#1

[eluser]caglarutkuguler[/eluser]
I recently migrated my CI website to a new server using a different domain name. The problem is that although the home page is displayed, none of the links work. I always get the same error message and no additional message: 404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

I think the problem is about the .htaccess file. Because when I add index.php to the URL, it works. As I am very inadequate in .htaccess files, I need immediate help.
My URL:

Click here to visit my CI Website

My current .htaccess file:
Code:
RewriteEngine on
RewriteRule ^$ /index.php [L]
RewriteCond $1 !^(index\.php|images|css|js|logs|sudokuwebyonetim|files|upload|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]

Thanks in advance.
#2

[eluser]teampoop[/eluser]
That looks right, are you sure the new server has the mod rewrite available to you? It's the part of Apache that allows you to rewrite the targets. Also you might try adding Options +FollowSymlinks
#3

[eluser]caglarutkuguler[/eluser]
[quote author="teampoop" date="1291171244"]That looks right, are you sure the new server has the mod rewrite available to you? It's the part of Apache that allows you to rewrite the targets. Also you might try adding Options +FollowSymlinks[/quote]

What do you mean by mod rewrite? Is it the file permissions?
And how can I add Options +FollowSymlinks?

I am a newbie and really don't know the meanings. However, I can easily discover.

Thanks.
#4

[eluser]teampoop[/eluser]
mod rewrite is a server configuration that is in probably in your httpd.conf file. If you aren't familiar with that, talk it out with your server admin. If they don't know what that is, run, don't walk, away from that server.

Code:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^$ /index.php [L]
RewriteCond $1 !^(index\.php|images|css|js|logs|sudokuwebyonetim|files|upload|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
#5

[eluser]caglarutkuguler[/eluser]
[quote author="teampoop" date="1291171703"]mod rewrite is a server configuration that is in probably in your httpd.conf file. If you aren't familiar with that, talk it out with your server admin. If they don't know what that is, run, don't walk, away from that server.

Code:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^$ /index.php [L]
RewriteCond $1 !^(index\.php|images|css|js|logs|sudokuwebyonetim|files|upload|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
[/quote]

I'll keep your advice about the server admin. Options +FollowSymlinks didn't work.
Thank you.
#6

[eluser]InsiteFX[/eluser]
You can try this with RewriteBase.
Code:
Options +FollowSymlinks
RewriteEngine on
RewriteBase /www.sudokuanaokulu.com.tr/
RewriteRule ^$ /index.php [L]
RewriteCond $1 !^(index\.php|images|css|js|logs|sudokuwebyonetim|files|upload|robots\.txt|favicon\.ico)

<IfModule mod_php5.c>
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_php5.c>
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

InsiteFX
#7

[eluser]caglarutkuguler[/eluser]
Didn't work either. Sorry.
#8

[eluser]InsiteFX[/eluser]
What do you have set for your application/config/config.php base_url ?

Also your htaccess needs to be in the same directory as your index.php file.

InsiteFX
#9

[eluser]caglarutkuguler[/eluser]
[quote author="InsiteFX" date="1291209156"]What do you have set for your application/config/config.php base_url ?

Also your htaccess needs to be in the same directory as your index.php file.

InsiteFX[/quote]

This is the line I use:

Quote:$config['base_url']= "http://www.sudokuanaokulu.com.tr/";

And my index.php is in the same directory as my .htaccess file.

Do you want me to provide ftp user and password?

Thanks
#10

[eluser]caglarutkuguler[/eluser]
SOLVED.

I changed my server. It was a Windoes server with PHP support. I switched to a LINUX server and it is working now.

Thanks for all your help. Especially thnx to teampoop and InsiteFX!




Theme © iAndrew 2016 - Forum software by © MyBB