Pls Help! Caught in a re-direct loop
-
I have followed the directions of the multisite network set up via the codex, up until the part in which it says I need to edit my .htaccess folder.
1) I cannot find my .htaccess folder
2) I was able to go ahead and create multiple sites anyway, that seem to work fine, but when i try to visit there dashboard i receive ” Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.”
3) My network setup instructions in my tools say NOTHING about .htaccess files, but rather tell me to edit my web.config file.
SUCH A MESS!
I am using Parallels panel with hostgator if that helps, I have a feeling it has to do with me not doing anything about the .htaccess file! PLEASE HELP!
-
Maybe .htaccess file is hidden in the configuration of the file manager of your hosting provider?
The network it’s not going to work without the .htaccess configured properly. Just search it in the same directory the index.php is located.
About the web.config file, which version of WP are you using?
i added my own .htaccess file to that folder, it is coming up as an apache security file. I still get a re-direct loop when trying to visit the dashboard of the new sites.
I did not deactivate my plugs at all during the install. If this is a problem, when during the process should I do it.
I am using version 3.5
Thanks for the response Mika, ive read almost all your posts/ replies looking for your guidance. Unfortunately I followed your link to a tee and still no cigar.
In my network admin, it has instructions for the network setup which includes this, something ive never seen before anywhere.
Add the following to your web.config file in
D:\InetPub\vhosts\desvoux.com\httpdocs\blog/
, replacing other WordPress rules:<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="WordPress Rule 1" stopProcessing="true"> <match url="^index\.php$" ignoreCase="false" /> <action type="None" /> </rule>'; if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) { .= ' <rule name="WordPress Rule for Files" stopProcessing="true"> <match url="^blog/([_0-9a-zA-Z-]+/)?files/(.+)" ignoreCase="false" /> <action type="Rewrite" url="blog/D:\InetPub\vhosts\desvoux.com\httpdocs\blog/wp-includes/ms-files.php?file={R:1}" appendQueryString="false" /> </rule>'; } .= ' <rule name="WordPress Rule 2" stopProcessing="true"> <match url="^blog/([_0-9a-zA-Z-]+/)?wp-admin$" ignoreCase="false" /> <action type="Redirect" url="{R:1}wp-admin/" redirectType="Permanent" /> </rule> <rule name="WordPress Rule 3" stopProcessing="true"> <match url="^" ignoreCase="false" /> <conditions logicalGrouping="MatchAny"> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" /> </conditions> <action type="None" /> </rule> <rule name="WordPress Rule 4" stopProcessing="true"> <match url="^blog/([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)" ignoreCase="false" /> <action type="Rewrite" url="blog/D:\InetPub\vhosts\desvoux.com\httpdocs\blog/{R:1}" /> </rule> <rule name="WordPress Rule 5" stopProcessing="true"> <match url="^blog/([_0-9a-zA-Z-]+/)?([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" /> <action type="Rewrite" url="blog/D:\InetPub\vhosts\desvoux.com\httpdocs\blog/{R:2}" /> </rule> <rule name="WordPress Rule 6" stopProcessing="true"> <match url="." ignoreCase="false" /> <action type="Rewrite" url="index.php" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
But doing so gives me a code error, and i cannot access any dashboard until i change it back to this.
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="wordpress" patternSyntax="Wildcard"> <match url="*"/> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> </conditions> <action type="Rewrite" url="index.php"/> </rule></rules> </rewrite> </system.webServer> </configuration>
Side notes- My main site is Desvoux.com and the blog has been installed on a separate folder on the host under ‘blog’. So when i go to make a new site, the new site is forced to be “Desvoux.com/blog/<insert new name>
Could this be the problem?
I am thinking about doing a complete wipe because it is a new blog and starting over.
Side notes- My main site is Desvoux.com and the blog has been installed on a separate folder on the host under ‘blog’. So when i go to make a new site, the new site is forced to be “Desvoux.com/blog/<insert new name>
Where do you want WP to be when people visit? Desvoux.com or Desvoux.com/blog?
It doesnt really matter. If I would have to change a bunch of stuff to my already existing site, then I would opt for Desvoux.com/blog.
The blog could be my homepage (Desvoux.com) if that makes things easier…
I have resolved this issue myself.
It turns out, I didnt need to mess with any .htaccess folders because I am using a windows server, not apache like wordpress assumes.
If you are following instructions in your tools > network setup and do not see any instructions on editing your .htaccess folder, but rather your web.config folder, I HIGHLY suggest you follow these steps
It gets a little tricky at the end.
If you are editing you’re already existing web.config folder, find the line of code that reads <rule name=”wordpress” patternSyntax=”Wildcard”. Clear some space for new code by pressing enter, then you need to stick this text in between.
<rule name="WordPress Rule 1" stopProcessing="true"> <match url="^index\.php$" ignoreCase="false" /> <action type="None" /> </rule> <rule name="WordPress Rule 2" stopProcessing="true"> <match url="^([_0-9a-zA-Z-]+/)?files/(.+)" ignoreCase="false" /> <action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false" /> </rule> <rule name="WordPress Rule 3" stopProcessing="true"> <match url="^([_0-9a-zA-Z-]+/)?wp-admin$" ignoreCase="false" /> <action type="Redirect" url="{R:1}wp-admin/" redirectType="Permanent" /> </rule> <rule name="WordPress Rule 4" stopProcessing="true"> <match url="^" ignoreCase="false" /> <conditions logicalGrouping="MatchAny"> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" /> </conditions> <action type="None" /> </rule> <rule name="WordPress Rule 5" stopProcessing="true"> <match url="^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*)" ignoreCase="false" /> <action type="Rewrite" url="{R:2}" /> </rule> <rule name="WordPress Rule 6" stopProcessing="true"> <match url="^([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" /> <action type="Rewrite" url="{R:2}" /> </rule> <rule name="WordPress Rule 7" stopProcessing="true"> <match url="." ignoreCase="false" /> <action type="Rewrite" url="index.php" /> </rule>
It should be between <rule> & <rule name=”wordpress” patternSyntax=”Wildcard” of your ALREADY EXISTING web.config folder text.
If you are sticking the new code found in that link or posted above in the wrong spot, you will receive error messages when you try to go to your login page, until you have it in the right spot.
Nice work trickrick!
A fine reference for people using IIS, adding it to my favorites.
FWIW, Apache is available on Windows Servers too. And if your are willing to play, you could try with the DB class for using SQL Server as DB backend instead of MySQL.Thanks a lot for sharing your final solution to this issue.
- The topic ‘Pls Help! Caught in a re-direct loop’ is closed to new replies.