Welcome Guest, Not a member yet? Register   Sign In
Clean URLs
#1

[eluser]DirtyLogic[/eluser]
I was having some issues with clean urls, but came up with a solution and thought I'd share it. First make a 2nd .htaccess outside of the application directory in the web root directory. Then make the edits here: http://pastebin.com/1gxw1U6E

NOTICE: Make sure you leave the original .htaccess file alone that is in your application directory. Failing to do so will expose your helpers, controllers, etc.

You also want to make sure you enabled mod rewrite in your httpd.conf apache configuration file as well as change line 29ish in config.php to read:

Code:
$config['index_page'] = '';
#2

[eluser]CroNiX[/eluser]
You just opened up a large security hole. You should NOT remove the htaccess protecting the /application directory as you stated. If you do, people will have direct access to your libraries, models, views, controllers, helpers, config settings and anything else, which they shouldn't have access to. See the user guide for how to do this properly.

All you should do is create a NEW htaccess like you mentioned in the root directory and leave the default htaccess files protecting the /application and /system directories alone! Please fix your guide before you steer people in the WRONG direction.
#3

[eluser]DirtyLogic[/eluser]
Well, this is for local development only, but I see your point. I was more focused on getting things working right and forgot that the original .htaccess file says Deny from all on the first line. I'll make sure I fix that, but thankfully there is no guide just what I've posted on here so far so that's a bonus. I'll edit my post. Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB