Welcome Guest, Not a member yet? Register   Sign In
Godaddy Horror!
#1

[eluser]RobertB.[/eluser]
Hey guys I know this question is ask here everyday but I can make my site work with what I found so far, so here goes again.

Let me start by saying that I have other sites at Godaddy running on CI framework and they are working good so I can figure out why this one is not working

My problem is routing

Site http://it360.us/

This works fine http://it360.us/index.php?/pages/network but obviously I want this
http://it360.us/network

Config file
Code:
$config['base_url']    = "http://it360.us/";
$config['index_page'] = "";
$config['uri_protocol']    = "REQUEST_URI";

Route file
Code:
$route['default_controller'] = "pages";
$route['network'] = "pages/network";

htaccess
Code:
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php index.html index.htm
RewriteEngine on
RewriteCond $1 !^(index\.php|img|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

Thanks, Robert
#2

[eluser]Jondolar[/eluser]
My experience is that GoDaddy performs upgrades on various servers which have disabled or changed settings that have broken some of my client sites. Sometimes it is weeks or months between upgrades on one server and upgrades on another server (one client fails, then another one fails for the same reason several weeks later).

If it was working before and no longer working, GoDaddy probably did an upgrade/change (that they won't admit to). If it never worked, but it works on other sites, get ready for it to stop working on other sites once the upgrade.

Good luck finding out the problem.
#3

[eluser]RobertB.[/eluser]
That sucks, how can I fix this? I have tried different htaccess variations and no luck.
Any subjections?

I got this other site working

These are the short and long urls
http://automotive.citysniff.com/category...r-painting
http://automotive.citysniff.com/index.ph...r-painting

htaccess
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]
I did all the setting the same way, they are both working from a single CI installation(same system folder for both) and one works and the other does not.

Thanks
#4

[eluser]theprodigy[/eluser]
Quote:htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]

Quote:htaccess
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php index.html index.htm
RewriteEngine on
RewriteCond $1 !^(index\.php|img|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

I'm not an htaccess guru by any means, but can the extra entries make a difference? Have you tried using the shorter htaccess on the new site?
#5

[eluser]RobertB.[/eluser]
Yes, I've tried both and right now the shorter version is the one that I'm using since yesterday because someone else told me that sometimes takes time for the htaccess to take effect in godaddy.
Can it be possible that I have an error in my code?
I'm not even using modules yet, everything is static, no database.

Here the:
Controller (pages.php)
Code:
if (!defined('BASEPATH')) exit('No direct script access allowed');

class Pages extends Controller
{

    function __construct()
    {
        parent::Controller();
        
        $this->load->model('pages_model', 'pages');
        $this->load->helper('text');
    }
    
    function index()
    {
        $this->home();
    }
    
    function home()
    {  
        $data['page'] = 'home';
        $data['main_content'] = 'pages/home_view';
        $this->load->view('templates/template', $data);  
    }
    
    function network()
    {
        $data['page'] = 'network';
        $data['main_content'] = 'pages/network_view';
        $this->load->view('templates/template', $data);
    }

View (network_view.php)
Code:
<div class="page">
    
        NETWORK
        
    </div>

And the Menu in the header.php
Code:
<div class="top_menu">  
            &lt;!--Begin Navigation--&gt;
            <ul id="navigation">
                <li><a href="" id="&lt;?php $home = ($page == " title="Home"><span>home</span></a></li>
                <li><a href="network" id="&lt;?php $network = ($page == " title="Network Solutions"><span>network solutions</span></a></li>
                <li><a href="repair" id="&lt;?php $computer = ($page == " title="Computer Repair"><span>computer repair</span></a></li>
                <li><a href="design" id="&lt;?php $design = ($page == " title="Web Design"><span>web design</span></a></li>
                <li><a href="contact" id="&lt;?php $contact = ($page == " title="Contact Us"><span>contact us</span></a></li>
                <li><a id="end"><span>end</span></a></li>
            </ul>
            &lt;!--Navigation close--&gt;
        </div>

That's it nothing to it.

Thanks
#6

[eluser]danmontgomery[/eluser]
[quote author="RobertB." date="1282683650"]someone else told me that sometimes takes time for the htaccess to take effect in godaddy.[/quote]

htaccess is read with each page load, so this isn't true.

[quote author="RobertB." date="1282683650"]Can it be possible that I have an error in my code?[/quote]

You're getting an apache 404, which means the request isn't even getting to codeigniter... I would first throw some garbage at the top of htaccess to ensure it's being read, you should receive an Internal Server Error if so
#7

[eluser]RobertB.[/eluser]
This is my new htaccess and no change at all

Code:
This really sucks!!!!

Why is not reading the the file?
#8

[eluser]RobertB.[/eluser]
We got it!!!
I went through the control panel and made a new htaccess file and now its reading it.

Thanks a lot guys.




Theme © iAndrew 2016 - Forum software by © MyBB