Wordpress instalado en la carpeta raíz, el subdominio ahora no funciona, host GoDaddy

please forgive me for being a complete beginner at this, I'd rather not have to try to deal with this myself but as GoDaddy support have not replied after 2 days I'm going to have to. I think my problem is the same as the one above, but I'm not 100% sure, so I'm reposting it, I'm not really confident enough to attempt to try the fixes I've seen here so I need someone to give me baby instructions?

Our original website (www.mwpics.com.au) was built in Dreamweaver etc, recently we created a new website in Wordpress, in a subdomain, then migrated it over to the root folder where it is now operating fine. I also moved the files for the old website into another directory which I called 'old', so they're all still there.

The problem is that I have a subdomain set up - which is still showing as set up in the control panel on godaddy the url is www.mwpics.com.au/clients and it is at www.clients.mwpics.com.au. This directory contains loads of other directories, each of which is password protected by .htaccess files and which our clients access directly (not through the site) to download their finished work. The test one and the one for random clients is www.mwpics.com.au/clients/temp - username and password both temp (the usernames are all the same as the directory names).

Since the WP install to the root directory the /clients extension no longer works (it should bring up an information page which is an .html index page in the directory) and the /clients/name extensions no longer works - it goes back to the wp site with a 'not found' error message. Strangely it does bring up the box for the username and password, but when you enter it it just goes back to the 'not found' message.

Someone told me it was the .htaccess file - so as an experiment, I renamed the .htaccess file in the root directory and then copied the .htaccess file from the old root files into the root directory, eureka! It worked - and also the WP site opened to the home page... but bummer - the /pages in the WP site now no longer worked! But at least I know the source of the problem.

So I switched it back and this is the status quo - I have no idea how to fix this, and with everyone back at work tomorrow, clients are going to want to start downloading their stuff...

Can anyone help me? I'm starting to panic a bit

preguntado el 09 de enero de 11 a las 07:01

2 Respuestas

you only have to exclude the clients subfolder in your wordpress .htaccess - see .htaccess & Wordpress: Exclude folder from RewriteRule for a detailed description

Esto debería funcionar:

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase / 
RewriteCond %{REQUEST_URI} !^/clients.*
RewriteCond %{SERVER_NAME} !clients\.yourdomain\.com
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

short: it simply skips the wordpress rewrite rule if the reqest uri starts with /clients or the domain name is clients.yourdomain.com

be aware though, that as soon as you update your wordpress permalink settings, this rule will be overwritten by wordpress ...

contestado el 23 de mayo de 17 a las 15:05

Can I post the .htaccess file here for you to look at, I kind of understand that answer but want to be sure - Cristina

# 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 - Cristina

oops sorry the line breaks got lost, do you want me to repost it - Cristina

added an example to my comment - hope this helps - romano

so I replace clients\.yourdomain\.com in your example with clients\.mwpics\.com.au or just leave it as you wrote it? (sorry) - Cristina

Try adding the following at the top of your root directory's .htaccess file, before the WP code block:

<IfModule mod_rewrite.c>
# fix rewrite for GoDaddy
Options -Multiviews

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} clients.mwpics.com.au$ [NC,OR] # ignore subdomain
RewriteCond %{REQUEST_FILENAME} -d [NC] # ignore directories
RewriteRule .* - [L]
</IfModule>

Respondido el 09 de enero de 11 a las 11:01

OK so I just copy this and paste it above the # BEGIN WordPress line? - Cristina

I forgot the mod_rewrite condition, so updated code example so that all of it could be placed at the top before # BEGIN WordPress. This way if WP is updated, the WP-specific code can change and this will be unaffected. - Ryan

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.