roots / sage

WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and a modern development workflow
https://roots.io/sage/
MIT License
12.74k stars 3.06k forks source link

roots 4: 403 error after theme activation? #213

Closed moimikey closed 12 years ago

moimikey commented 12 years ago

wish i had a little more insight, but the following options were enabled, before giving the 403/forbidden error after theme activation. will look into it and try to debug as well:

static front page - yes change permalink structure - yes change uploads folder - yes create nav menus - yes add pages to menu - no

additionally the "Please make sure your .htaccess file is writable" notification

htaccess:

http://pastebin.com/7Uhs6K0k

moimikey commented 12 years ago

ah... it actually may then be contributed to FastCGI configurations now that I'm thinking about it...

moimikey commented 12 years ago

or maybe not.

retlehs commented 12 years ago

can you try replacing inc/h5bp-htaccess with a version before jan 2nd? https://github.com/retlehs/roots/commits/master/inc/h5bp-htaccess

moimikey commented 12 years ago

that did the trick.

retlehs commented 12 years ago

can you figure out which part of my two commits on the 2nd broke your setup? :)

moimikey commented 12 years ago

looking now =)

moimikey commented 12 years ago

Apache Performance Tuning


Without -SymLinksIfOwnerMatch Apache will have to issue extra system calls to check up on symlinks. For highest performance and no symlink protection set +FollowSymLinks and -SymLinksIfOwnerMatch httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks

Options -SymLinksIfOwnerMatch

moimikey commented 12 years ago

whoopsies. but yes. that's what's doing it.

retlehs commented 12 years ago

https://github.com/h5bp/html5-boilerplate/commit/e2ca1bf93104b773a05c1ffc32086d9373920b78#.htaccess

mind opening an issue over in the h5bp repo?

moimikey commented 12 years ago

with pleasure

moimikey commented 12 years ago

well that was quick:

mathiasbynens commented 2 minutes ago @moimikey Thanks for the report; reverted for now.

@laukstein You mentioned “I just checked - it seems not affecting rewrite rules” — got any more info on that?

retlehs commented 12 years ago

thx @moimikey!

laukstein commented 12 years ago

@retlehs, @moimikey - I checked my added rules on latest WordPress - it does not case any negative affects.

The .htaccess in http://pastebin.com/7Uhs6K0k is not valid. @moimikey, uncomment http://pastebin.com/7Uhs6K0k lines from 350 - 35, remove line 5 and move WordPress rules (line 3 - 15) to line 367 after Options -SymLinksIfOwnerMatch.

# ----------------------------------------------------------------------
# Start rewrite engine
# ----------------------------------------------------------------------

# Turning on the rewrite engine is necessary for the following rules and features.
# FollowSymLinks must be enabled for this to work.

<IfModule mod_rewrite.c>
   Options +FollowSymlinks
   RewriteEngine On
</IfModule>

# ----------------------------------------------------------------------
# Apache Performance Tuning
# ----------------------------------------------------------------------

# Without -SymLinksIfOwnerMatch Apache will have to issue extra system calls to check up on symlinks.
# For highest performance and no symlink protection set +FollowSymLinks and -SymLinksIfOwnerMatch
# httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks

Options -SymLinksIfOwnerMatch

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^css/(.*) /wp-content/themes/hsquared/css/$1 [QSA,L]
RewriteRule ^js/(.*) /wp-content/themes/hsquared/js/$1 [QSA,L]
RewriteRule ^img/(.*) /wp-content/themes/hsquared/img/$1 [QSA,L]
RewriteRule ^plugins/(.*) /wp-content/plugins/$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Now it must be working well.

moimikey commented 12 years ago

@laukstein this is @retlehs's call.

laukstein commented 12 years ago

@retlehs, is there anything you would like to say?

retlehs commented 12 years ago

h5bp-htaccess (which doesn't have to be used with roots) is based off the .htaccess file in the h5bp repo and it will always be applied AFTER the main wordpress rules

not going to change it up so that h5bp-htaccess is required and parts of it come before the wordpress rules, it's already a pain in the ass. (#120)