Jump to content

ProcessWire 2.2 [soft launch]


ryan
 Share

Recommended Posts

  • 2 weeks later...

The update process is really easy :-) Just the need for changing the .htaccess is a bit annoying as I make individual changes there.

Is there a better way then just comparing the files everytime?

You can use file compare in various IDE's. Also I think there's no easier way than do it manually, but I think the .htaccess doesn't change in every update. Most convenient way would be to look at the commit log on github if there really were any changes on the htaccess and which.

Link to comment
Share on other sites

Yup - I think we were advised to update the .htaccess in one release (can't honestly remember) but it's certainly not the norm and I'm sure Ryan would mention it if it were required.

Link to comment
Share on other sites

It's true that the htaccess doesn't change very often, but when it changes, you want to be sure to get it. So I think it's best for people to include that (and /index.php) in addition to replacement of the /wire/ directory, when doing an upgrade.

If you look in PW's htaccess file, you'll see it's very clear about where the ProcessWire directives start and end:

#####################################################
# START PROCESSWIRE HTACCESS DIRECTIVES
# @version 2.2
#####################################################

...and all of PW's htaccess directives go here...

#####################################################
# END PROCESSWIRE HTACCESS DIRECTIVES
#####################################################

So when I'm customizing an htaccess, I either place my custom directives above ProcessWire's, or if they need to go somewhere in the middle, I add a comment to make it clear that it's specific to the site I'm working on, and I indent it more than the others so that it stands out even more:

             # THIS DIRECTIVE IS FOR DI.NET ONLY: 
             RewriteCond %{HTTP_HOST} !^www\. [NC]
             RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

This makes it really easy to manage a customized .htaccess file through upgrades.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...