Welcome Guest, Not a member yet? Register   Sign In
Codeigniter addon domain godaddy .htaccess
#1

Hello,

I have tried several .htaccess modifications per many threads and I give up.

I have a godaddy hosting account and I setup an addon domain that I am using as my main site.

The structure is below, the blue box is the addon domain, let's call is mysite.com. You can see the .htccess at the root of the addon domain. I can access the main page of my site just fine. If I click cart, the URL changes to mysite/?cart but stays on the main page, I have another link called order tracking, if I click this link I go to the page correctly and the URL is mysite/tracking. The only difference in the two links is that there is a routing for tracking to the controller ordertracker ($route['tracking'] = 'ordertracker'Wink.

[Image: lYBpQ.png]

[Image: TULnT.png]


Routes


$route['default_controller'] = 'main';
$route['add']                = 'cart/add_to_session_cart';
$route['tracking']           = 'ordertracker';
$route['cart/delete/(.+)']   = 'cart/delete_session_item';
$route['404_override']         = '';
$route['translate_uri_dashes'] = FALSE;

.htccess

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.)$ index.php?/$1 [QSA,L]
ErrorDocument 404 index.php
</IfModule>

Links

<ul class="nav navbar-nav navbar-right">
         <li></li>
         <li><a href="<?php echo base_url().'tracking'; ?>" title="Track an Order"><i class="fa fa-truck fa-flip-horizontal fa-md white" aria-hidden="true"></i>&nbsp;Track Order</a></li>
         <li>
           <a href="<?php echo base_url().'cart'; ?>">
             <span class="badge cart_badge"><?php echo $this->session->userdata('cart_count'); ?></span><i class="fa fa-shopping-cart fa-md white" aria-hidden="true" title="Cart"></i>&nbsp;Cart
           </a>
         </li>
       </ul>
Reply


Messages In This Thread
Codeigniter addon domain godaddy .htaccess - by reesethebeast - 12-20-2016, 12:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB