Rewrite fails

  • Posted December 11, 2013

I’m not able to get certain redirects to work, which worked when the sites were on a shared host.

This fails:

RewriteCond %{HTTP_HOST} ^ [NC] RewriteRule ^(.*)$$1 [L,R=301]

Entering gives zpanel…

What am I doing wrong on the setup of the droplet?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

<blockquote>Sadly - this destroys zpanel.</blockquote> <br>That’s a good thing in my opinion. ;) I don’t recommend using control panels unless you’re reselling hosting where clients want an easy-to-use control panel. Plus, they usually drain a lot of resources such as memory since your server needs to run the control panel as well. Eventually you’ll be more comfortable with the command line and prefer it to control panels. <br> <br>Let me know how it goes!

Hi, <br> <br>Unfortunately this did not work. I decided to retry my hands with nginx. The WordPress and XenForo portions load fine. I’m now working on the mediawiki install. <br> <br>Sadly - this destroys zpanel. Interestingly the roll over still does not work. <br>

<blockquote> is set forward to by GoDaddy </blockquote> <br>There’s your problem. GoDaddy shouldn’t handle that. Add it to zPanel as an addon domain for your existing domain name so that it shares the same files. Then based on your .htaccess rules it should redirect to the correct domain. is in zpanel as a domain with the same directory as <br> is set to roll to by WordPress domain mapping <br> is set forward to by GoDaddy <br> <br>I must have a setting somewhere causing this problem but don’t know where to look. <br> <br>

It seems that zPanel is causing this, did you add to zPanel?

Sorry, but I tried nginx months ago and the permalinks were completely messed up. <br> <br>I’m well aware of the .htaccess rules and as I stated this worked on a shared hosting but does not work on the DO droplet. Something is stopping the redirect. I see I asked this question another way in August too and wasn’t given any resolution.

Why use Apache, when WordPress best-practices recommend Nginx? <br> <br>If you <i>really</i> want to stick w/Apache, check out: <a href=“”>htaccess | WordPress Codex</a>.