Welcome Guest, Not a member yet? Register   Sign In
Getting feet wet-- couple of "best practice" questions
#12

[eluser]frost9928[/eluser]
I opted to use a pre-made .htaccess file which works really well and doesn't get in the way when it comes to images and other such things.

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

    #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 [L]
    
    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [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 [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>

Not my work by the way found it through Google and can't find it again to save my life but it works great.


Messages In This Thread
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-08-2010, 01:24 PM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-08-2010, 02:35 PM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-08-2010, 04:13 PM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-09-2010, 12:40 AM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-09-2010, 07:11 AM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-09-2010, 07:48 AM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-12-2010, 02:17 PM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-12-2010, 02:37 PM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-12-2010, 03:28 PM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-13-2010, 07:11 AM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-13-2010, 11:10 PM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-13-2010, 11:49 PM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-14-2010, 12:37 AM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-19-2010, 03:48 PM
Getting feet wet-- couple of "best practice" questions - by El Forum - 04-20-2010, 10:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB