Welcome Guest, Not a member yet? Register   Sign In
View located in different default folder
#11

(This post was last modified: 01-12-2018, 07:51 PM by c3media.)

(01-12-2018, 11:24 AM)jreklund Wrote: Totally forgot you will need to access your Segway class this way.
http://localhost/sma/segway/show_grid
http://localhost/sma/index.php/segway/show_grid

Codeigniter only loads the index() function on default.
You can overwrite the default function by placing this in your route.
PHP Code:
$route['segway'] = 'segway/show_grid'

I thought you got a "real" 404 and not Codeigniters 404 messages. But had a look at my dev machine at home now.

Hello, it's working fine; now I have a problem with .htaccess file about ubication.

I have two .htaccess files located so...
1- .htaccess in root folder:


Code:
DirectoryIndex index.php index.html

<IfModule mod_rewrite.c>

RewriteEngine On
# RewriteBase /sma/
# RewriteCond $1 !^(index\.php|assets|install|update) 
# RewriteCond $1 !^(index\.php|assets|files|update|updatepos|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# For godady Shared Hosting Server uncomment the line below
# RewriteRule ^(.*)$ index.php?/$1 [L]


# Please comment this if you have uncommented the above
RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]

</IfModule>

2- .htaccess in APP folder:


Code:
<IfModule authz_core_module>
    Require all denied
</IfModule>
<IfModule !authz_core_module>
    Deny from all
</IfModule>

Then I'm getting error to CRUD operations:
Failed to load resource: the server responded with a status of 403 (Forbidden)

Thanks by your help!
Reply


Messages In This Thread
RE: View located in different default folder - by c3media - 01-12-2018, 07:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB