CodeIgniter Forums
New Codeigniter site problems - 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: New Codeigniter site problems (/showthread.php?tid=13417)

Pages: 1 2


New Codeigniter site problems - El Forum - 11-21-2008

[eluser]chicoNERD[/eluser]
hi, i am new to this forum and i new to codeigniter.

i was building a website using codeigniter and everything is working
fine in the local testing server.
However, when i uploaded the site the server the links die.
i can click on any link and it just show the first page.
the link in the address bar change, but the page still the same.

is it something different that must be done before a live website?
i have the htaccess file and everything in the right place.


New Codeigniter site problems - El Forum - 11-21-2008

[eluser]alanphil[/eluser]
Hello!

Check that your config.php file is correct for the new environment. Do you need to update the base_url or index_page? Is your .htaccess correct for the new server? Database config correct?

If all of these are good, please provide more information on what exactly is not working.

Alan


New Codeigniter site problems - El Forum - 11-21-2008

[eluser]chicoNERD[/eluser]
[quote author="alanphil" date="1227317135"]Hello!

Check that your config.php file is correct for the new environment. Do you need to update the base_url or index_page? Is your .htaccess correct for the new server? Database config correct?

If all of these are good, please provide more information on what exactly is not working.

Alan[/quote]

the base_url is set to the website name that is http://travesurahouse.com
and the index is left blank becuase htaccess is doing the job..
and yeah i got the htaccess from someone who posted here that is the recommended htacess to use.

check the website is online now..

travesurahouse.com

when you click on the link nothing happens..

and i have pages working which are /home/ /party/ /artist/ can't access any of them when i type it in the address i get sent to the welcome page


New Codeigniter site problems - El Forum - 11-21-2008

[eluser]alanphil[/eluser]
1. What is the default controller?
2. Does this host support .htaccess files? Try disabling the .htaccess temporarily and see if the subpages work.


New Codeigniter site problems - El Forum - 11-21-2008

[eluser]chicoNERD[/eluser]
the default controller is welcome which is welcome.php

and it invokes the welcome_message from the view folder

yeah i been using .htaccess for a long time..

i disable the .htaccess and it shows me the welcome page but when i try to click a link it says 404 not found


New Codeigniter site problems - El Forum - 11-21-2008

[eluser]alanphil[/eluser]
So, with the .htaccess disabled, now you can see your pages, for example:
http://travesurahouse.com/index.php/home/

Looks like the problem is with the .htaccess file.


New Codeigniter site problems - El Forum - 11-21-2008

[eluser]chicoNERD[/eluser]
if this helps it doesn't matter what i type on the address bar it still sends me to the welcome page.

anything after the first / sends me to the welcome page i can put a link that dont exist and i dont get an error, i get the welcome page


New Codeigniter site problems - El Forum - 11-21-2008

[eluser]chicoNERD[/eluser]
oh true it is the .htaccess

this si what i got

Code:
DirectoryIndex index.php

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



New Codeigniter site problems - El Forum - 11-21-2008

[eluser]alanphil[/eluser]
You mentioned that you have used .htaccess files with this host before. Have you done mod_rewrite before inside of the .htaccess files? If not, then you need to make sure that mod_rewrite is enabled on the server.


New Codeigniter site problems - El Forum - 11-21-2008

[eluser]chicoNERD[/eluser]
this is the .htaccess file that i used before
Code:
# Use PHP5CGI as default
AddHandler fcgid-script .php
Options -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
#    RewriteCond %{HTTP_HOST} !^www\.
#    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    RewriteRule ^(.*)\.html $1.php
    RewriteRule ^img/([0-9]+)/$ /test.php?id=$1
    RewriteRule ^gallery/cat/([0-9]+)/$ /gallery/thumb.php?id=$1
    RewriteRule ^gallery/cat/([0-9]+)/img/([0-9]+)/$ /gallery/displayimage.php?album=$1&ptd;=$2
    RewriteRule ^gallery/vote/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/$ /gallery/lib/photovote.php?ptd=$1&album;=$2&rate;=$3rand=$4
    RewriteRule ^gallery/cat/([0-9]+)/([0-9]+)/$ /gallery/thumb.php?id=$1&p=$2
    RewriteRule ^inc/check/email/$ /inc/lib/emailcheck.php
    RewriteRule    ^activate/([0-9]+)/([a-z0-9-]+)/$ /activate.php?idtt=$1&code;=$2
    RewriteRule ^calendar/party/([0-9]+)/$ /calendar/display.php?pid=$1
    RewriteRule ^music/song/([0-9]+)/$ /music/count.php?id=$1
    RewriteRule ^music/artist/([0-9]+)/$ /music/profile.php?id=$1
#    RewriteRule ^travesurahouse\.com/([a-zA-Z][[0-9]+)$ home.php
#    RewriteRule ^travesurahouse\.com/([0-9]+)$ profile/profile.php?id=$1
    
    </IfModule>

<Files 403.shtml>
order allow,deny
allow from all
</Files>

RewriteCond %{HTTP_HOST} ^travesurahouse.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.travesurahouse.com$
RewriteRule ^chat/?$ "http\:\/\/www\.travesurahouse\.com\/home\.html" [R=301,L]