Ben
(@benbornschein)
Here 🙂
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.example.net$ [NC]
RewriteRule ^(.*) http://members.example.net/$1 [QSA,R=301,L]
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Ben, I dont think I explained myself right. I added your info to the htaccess that lives inside my subdomian, but I think I need to have it in my root of my main domain not sub.
So basically when someone goes to schylling.net they are to be redirected to members.schylling.net.
So If I added your code to my root folder htaccess file would that work?
Thanks,
Derrick
Ben
(@benbornschein)
Correct, you have to add it to your root where your schylling.net is linked to.
Something has gone arry!! This is the error I get:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@members.schylling.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Ben
(@benbornschein)
Please post your complete .htaccess, maybe it is just a little syntax error.
Ok, I figured out that I had the same 2 acess files in root and sub. So I removed the one from the sub. So now if you type in http://www.schylling.net you end up at http://members.schylling.net But when you type in http://schylling.net you end up at the root and not at members. What is the code to add just http://?
Ben
(@benbornschein)
To fix this, instead of
RewriteCond %{HTTP_HOST} ^www.schylling.net$ [NC]
write
RewriteCond %{HTTP_HOST} ^(www.)?schylling.net$ [NC]
-
This reply was modified 6 years, 9 months ago by Ben.
Well Ben, I killed it. This is what I get now when I try it with www. or without:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@schylling.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
And here is what I have in htaccess file:
# To set your custom php.ini, add the following line to this file:
suphp_configpath /home/schyll5/public_html/php.ini
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www.)?schylling.net$ [NC]
RewriteRule ^(.*) http://members.schylling.net/$1 [QSA,R=301,L]
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Ben, I copied the code from that link and I still have the 500 internal server error. Did I screw this up big time or what!!!!
Ben
(@benbornschein)
I checked my code again, it works. You can also try to download my schylling.txt rename it to .htaccess and upload it to your website.
-
This reply was modified 6 years, 9 months ago by Ben. Reason: Removed my ask to get ftp access
@benbornschein: Thanks for helping out, but please don’t do that: when you offer to get admin access and/or FTP access then you’re really going too far and that’s not cool.
https://make.wordpress.org/support/handbook/forum-welcome/#the-bad-stuff
If you are given admin credentials, you are potentially liable for any potential damage that maybe caused, not only by yourself but anyone accessing the system. Even if you do not provide warranty with your own product.
Unless you’re willing to take responsibility for that user’s installation from now on (and they should NOT let you do that) then please do not ask or suggest that someone provide you those admin or FTP details.
You can provide assistance here, ask for log data, you can make recommendations and even suggest changes. But do not seek admin or FTP access. That’s just going too far.
Ok, I downloaded your TXT file, and then added this fix:
RewriteCond %{HTTP_HOST} ^(www.)?schylling.net$ [NC]
And now all is well!
Thanks for all your help Ben!
Ben
(@benbornschein)
I’m glad I could help you 🙂