Welcome Guest, Not a member yet? Register   Sign In
modules htaccess directory index
#1

[eluser]the_unforgiven[/eluser]
How can i specify what i want the directory index to be?

Currently have the main url has: http://localhost/bb/static/home which is what i want it to point to when just navigating to localhost/bb/ but it looks for the index.php file but i dont want that.

I have this in my htaccess at present.

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /bb/

    DirectoryIndex //what should i put here to point to my module controller of site/site??
    
    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [QSA,L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>
#2

[eluser]the_unforgiven[/eluser]
Anyone?
#3

[eluser]the_unforgiven[/eluser]
So basically when I nav to localhost/bb/ i need it show the home page which is currently localhost/bb/site/index


Any idea's on this would be greatly appreciated.
#4

[eluser]Ochetski[/eluser]
Is it another page or codeigniter one?
If it's codeigniter. You can set the default route on routes.php config file to this place...
#5

[eluser]the_unforgiven[/eluser]
This image show my structure: http://dug.im/aa326

Modules > Site > Site Controller has method index which i want to show when navigating to localhost/bb/

And in my routes i have:

Code:
$route['default_controller'] = 'site/site';
$route['404_override'] = '';
/*
| -------------------------------------------------------------------------
| CUSTOM ROUTES
| -------------------------------------------------------------------------
*/
$route['static/program_search'] = 'site/site/program_search';
$route['static/search']      = 'site/site/p_search';
$route['(:any)']            = 'site/site/index/$1'; // Pages Routes

Bu this $route['(:any)'] then won't allow access to localhost/bb/admin which is the CMS i have built. Which obviously needs to be accessibile.
via this route: $route['admin'] = 'sessions/index';




Theme © iAndrew 2016 - Forum software by © MyBB