I'll get right to it because this will be long.
I've built a WordPress site for a client on a new domain name and 301 redirected his 3 other domains to point to it. Then, I learn that he has a database associated with his site that his clients need to access. I had not noticed this, but it is there.
Logging into the database was accomplished by going to "olddomainname.com/login". Problem is, now with the redirect in place I can't get there. Solutions from GoDaddy support were:
- .htaccess redirect exception for "olddomainname.com/login".
- Script a new connection to the database (since DB isn't bound to domain).
I am, of course, in over my head here! I've never worked with DB's and though I can follow instructions I fear messing with scripting a new connection because it seems complicated (multiple users etc).
I'd love to add the redirect exception for "olddomainname.com/login" because it seems like the simplest option. I have googled plenty for answers and tried a few things but without success. Also, would the exception have to include whichever directory I'm taken to next after login?
I'll post the .htaccess file below and hopefully you all can point me in the right direction. It is rather long,, also I have Ultimate Coming Soon Page plugin installed so I don't know if that's messing with the few exception attempts I've made, though I can see the site when I'm logged in just fine.
rewriteengine on
rewritecond %{HTTP_HOST} ^www.olddomainname.info$ [OR]
rewritecond %{HTTP_HOST} ^olddomainname.info$
rewriterule ^ "http\:\/\/newdomainname\.com\/" [R=301,L] #4f8bdeef8097b
rewritecond %{HTTP_HOST} ^www.olddomainname.biz$ [OR]
rewritecond %{HTTP_HOST} ^olddomainname.biz$
rewriterule ^ "http\:\/\/newdomainname\.com" [R=301,L] #4f8bded088493
rewritecond %{HTTP_HOST} ^www.olddomainname.com$ [OR]
rewritecond %{HTTP_HOST} ^olddomainname.com$
rewriterule ^ "http\:\/\/newdomainname\.com" [R=301,L] #4f8bde0b68ea5
rewritecond %{HTTP_HOST} ^www.olddomainname.net$ [OR]
rewritecond %{HTTP_HOST} ^olddomainname.net$
rewriterule ^ "http\:\/\newdomainname\.com" [R=301,L] #4f8bdea67d365
<IfModule mod_rewrite.c>
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Admin1
#Rename 'application' to your applications folder name.
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: Admin2
ErrorDocument 404 /index.php
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
rewritecond %{REQUEST_URI} ^system.*
rewriterule ^(.*)$ /index.php?/$1 [L]
rewritecond %{REQUEST_URI} ^application.*
rewriterule ^(.*)$ /index.php?/$1 [L]
rewritecond %{REQUEST_FILENAME} !-f
rewritecond %{REQUEST_FILENAME} !-d
rewriterule ^(.*)$ index.php?/$1 [L]
rewriterule ^index\.php$ - [L]
rewritecond %{REQUEST_FILENAME} !-f
rewritecond %{REQUEST_FILENAME} !-d
rewriterule . /index.php [L]
That's it. Sorry there's so much but I wanted to make sure you had all the info in case something else in the file was interfering. Only other stuff in there is the gzip stuff and I left that out. Any help is much, much, MUCH appreciated as this is for a client and I'm feeling, well, down in the dumps about the spot I'm in.
*Mods: I see my post is quite long compared to others I've seen. If I'm too long-winded or off in any way with this first post of mine please let me know!
RewriteCond %{REQUEST_URI} !^/login