#6 automatic .htaccess or disable pretty urls

closed-accepted
ccHost (6)
5
2007-02-14
2007-01-08
No

In ccadmin/index.php this adds an extra catch to step_3.php to check and see if pretty_urls is turned on and if so runs a new function, install_htaccess().

install_htaccess() is modeled after install_db_config(). It checks to see if there is an existing .htaccess file and if so it disables the pretty_urls option and warns the user. If there is not a .htaccess file, it tries to create one, again disabling the option and warning the user if creating it fails.

I've tested this on my server, It seems to work pretty well.

The only bug I noticed was that it gives me the error 'Error creating tables:' at the beginning of the database section if install_htaccess fails. It also gave me the tables error when my admin password contained un allowed characters, however, so I believe that this is a bug unrelated to my code.

Discussion

  • Nathan Friedly

    Nathan Friedly - 2007-01-08
    • priority: 5 --> 4
    • summary: automatic .taccess or disable pretty urls --> automatic .htaccess or disable pretty urls
     
  • Nathan Friedly

    Nathan Friedly - 2007-02-13
    • assigned_to: nobody --> kidproto
     
  • Nathan Friedly

    Nathan Friedly - 2007-02-13

    Logged In: YES
    user_id=1677461
    Originator: YES

    and, as mentioned in an email, this would cause trouble if mod_rewrite is not enabled on the server.

     
  • Jon Phillips

    Jon Phillips - 2007-02-13
    • priority: 4 --> 5
    • assigned_to: kidproto --> fourstones
     
  • Jon Phillips

    Jon Phillips - 2007-02-13

    Logged In: YES
    user_id=914868
    Originator: NO

    VS, can you take a look at this one? It would be good to get in b4 WED package, for testing, etc...

    Thanks nathan!

     
  • Jon Phillips

    Jon Phillips - 2007-02-14
    • labels: --> ccHost
    • status: open --> closed-accepted
     
  • Jon Phillips

    Jon Phillips - 2007-02-14

    Logged In: YES
    user_id=914868
    Originator: NO

    Thanks...this has been applied with a few modifications...please apply for a developer level account and full svn access now :)

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks