1

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>
2
  • 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? Aug 10, 2013 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? Aug 10, 2013 at 16:39

1 Answer 1

1

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?

5
  • 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. Aug 10, 2013 at 16:41
  • what you should do is what I described on the last paragraph of the answer. Aug 10, 2013 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. Aug 10, 2013 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. Aug 11, 2013 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 Aug 11, 2013 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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