Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter setup and PHP require errors
#6

[eluser]WanWizard[/eluser]
This is the one that I include in every project I do:
Code:
<IfModule mod_rewrite.c>

    # ATTENTION: if this .htaccess doesn't work, check if rewrites
    # are allowed in httpd.conf. You need to specify:
    # <Directory "my-website-directory-here">
    #     Options +FollowSymLinks
    #     AllowOverride FileInfo
    # </Directory>
    # or have these options defined globally in your httpd.conf file
    # to allow a .htaccess with rewrite rules to work!

    # activate URL rewriting
    RewriteEngine On

    # if ExiteCMS is installed in a sub-directory of the document
    # root, modify the path below accordingly
    RewriteBase /

    # nasty hack to capture ruined URI's by a mod_rewrite bug.
    #
    # You need these two lines when you use mod_vhost_alias, and this
    # .htaccess file generates a "500 internal server error".
    # In the rule below, replace --DOCROOT-- by your full docroot path,
    # without a leading slash, but with a trailing slash!
    # (i.e 'path/to/my/docroot/', without quotes offcourse)
    #
#    RewriteCond $1 index\.php/$
#    RewriteRule ^--DOCROOT--(.*)$ /$1 [S=1]

    # do not rewrite links to development stuff (not needed when live!)
    RewriteCond $1 !^!dev

    # do not rewrite links to website assets
    RewriteCond $1 !^assets

    # do not rewrite for php files in the document root or robots.txt
    RewriteCond $1 !^([^\..]+\.php|robot\.txt)

    # do not rewrite requests for the standard asset files
    RewriteCond $1 !\.(css|js|png|jpg|gif|zip|gz|htc)$

    # but rewrite everything else
    RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>

Hasn't failed me up till now...


Messages In This Thread
CodeIgniter setup and PHP require errors - by El Forum - 05-02-2010, 09:18 PM
CodeIgniter setup and PHP require errors - by El Forum - 05-02-2010, 11:22 PM
CodeIgniter setup and PHP require errors - by El Forum - 05-02-2010, 11:42 PM
CodeIgniter setup and PHP require errors - by El Forum - 05-02-2010, 11:58 PM
CodeIgniter setup and PHP require errors - by El Forum - 05-03-2010, 03:32 PM
CodeIgniter setup and PHP require errors - by El Forum - 05-03-2010, 04:11 PM
CodeIgniter setup and PHP require errors - by El Forum - 05-03-2010, 04:12 PM
CodeIgniter setup and PHP require errors - by El Forum - 05-04-2010, 10:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB