Not that there’s anything wrong with using the cPanel interface to edit .htaccess files, but if I do edit them in the shell, what’s required to implement the changes? Saving in cPanel makes things live immediately, but saving in ssh doesn’t seem to.
Editing in shell is definitely immediate, so we’d need more information on what you’re doing. Any changes saved to .htaccess are immediately active (though sometimes a browser will cache certain information)
Somehow it’s not so immediate for me.
STR:
Edit public_html/.htaccess
in cPanel to set up a redirect from root to a WordPress install
# BEGIN root redirect
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/?$
RewriteRule (.*) /bleahh/ [R=301,L]
</IfModule>
# END root redirect
Save from cPanel → effective immediately
ssh in to the server
cd public_html
vi .htaccess
Change bleahh
to omekas
:wq
Still hasn’t kicked in a couple hours later
I think that’s all I’ve done, but maybe there’s a missing step I’m not noticing.
That definitely sounds like a browser caching issue. A 301 redirect is a permanent redirect and browsers take the word permanent seriously :). Try a different browser to confirm. When testing redirects I would use 302 instead which is a temporary redirect and shouldn’t get cached in the browser.
Dammit!
I thought I had read your tute properly (quickly, but properly) and was using the temp code.
Second browser checks out your response. Tx!