Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am attempting to set up my site using a temp URL (IP/~username/domain) through hostgator, but I am running into some issues. I have gone into the database and replaced all instances of my old domain with the new temp URL.

Problem is I am running into a redirect loop. I read somewhere to try resetting permalinks, but I don't have access to the admin panel. I'm not sure what else to try to fix the redirect loop. I even replaced my .htaccess with a fresh one, and still get the redirect loop.

Here is my current wp-config file:

define("WP_SITEURL","http://IP/~username/example.com");
define("WP_HOME","http://IP/~username/example.com);

define('DOMAIN_CURRENT_SITE', 'IP/~username/example.com');
define('PATH_CURRENT_SITE', '/');

And my current .htaccess:

###############################################################

# BEGIN WordPress
<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress

##############################################################

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !.*\.(jpeg|jpg|gif|png|ico)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /home.php [L]
</IfModule>
share|improve this question
    
First: you're missing a quote in the WP_HOME definition line. I'm hoping this is just a typo in the code for the quesion: define("WP_HOME","http://IP/~username/example.com"); <-- The double quote after .com. Second: what do the constants DOMAIN_CURRENT_SITE and PATH_CURRENT_SITE do? I don't see them referenced in the Codex page on editing wp-config. Third: Can you post the actual link to your site so we can take a look at what's happening? –  morganestes Aug 10 '13 at 2:16
    
Yes, that is a typo. I honestly do not know what DOMAIN_CURRENT_SITE and PATH_CURRENT_SITE do. I can't really find much on it when I search. I'm thinking it may have something to do with multisite. I'd rather not give the URL since it has my hosting username and IP. I took a screenshot of the error I am getting. Is there a way to attach it? –  myladeybugg Aug 10 '13 at 16:39
add comment

1 Answer

I assume IP stands for your IP address. In that case you are probably blocked by hostgator, as it can't decide based only on the IP address which account is being accessed. in addition ~username is probably a URL that isn't configured/accessible on the server.

In other words, ask hostgator for support.

Why do you even go for this when you can simply set everything correctly on the new server and just change the IP address associated with your domain in your local localhost file?

share|improve this answer
    
I previously asked Hostgator, and they couldn't figure out why it wasn't working. They assume it's because I am running multisite, but I asked on the Wordpress forums and you should be able to use a temp URL with multisite. I'll ask them for help again. This is my test server. I want to be able to make modifications to code on this server before adding them to my live server. I do not know if this is the best way to do this, it's the only thing I thought of being a beginner. –  myladeybugg Aug 10 '13 at 16:41
    
what you should do is what I described on the last paragraph of the answer. –  Mark Kaplun Aug 10 '13 at 17:17
    
I can already access the site through my host files, if this is what you are suggesting. It just becomes a pain when having to go in and out of the host files, which is why I was trying to set up the site using a temp URL. –  myladeybugg Aug 10 '13 at 17:33
    
hmm, yes that is what I was suggesting, this way you don't need to change URL or your wp-config. There are some drawbacks when trying to test integration with things like facebook, but in the end it is easier then what your try. –  Mark Kaplun Aug 11 '13 at 4:01
    
Thank you for the help. I do have one question. When navigating to the site through my host files I have to add www to the domain, do you think I need to add www to the temp URL? So it would be IP/~username/www.example.com –  myladeybugg Aug 11 '13 at 7:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.