Upon uploading my site files to a GoDaddy hosted website -- with a "coming soon" sort of maintenance page I'm assuming is generated by GD (headline "Future home of something quite cool") -- that's on a shared FTP account for which the root is a different domain and there are others under it (root site), but the root site has no htaccess file and the /www/ htaccess file is blank, for one thing; I know mine works, does on my localhost; and so from the root site folder '/', the subject site's path is 'www/site/', and subsite.com shows the placeholder welcome/coming soon page I mentioned (welcome.html) and 'subsite.com/www/site' shows my index.php I uploaded (the previous site was in /www/, so I uploaded to /www/site/). So 'subsite.com/www/site/about' is supposed to show my about.php, but instead returns a 404 error -- and not my 404 error doc specified in my htaccess file neither.

Here is my .htaccess in /subsite/www/site/:

Options +FollowSymlinks
Options -Multiviews

<IfModule mod_rewrite.c>

    SetEnv HTTP_MOD_REWRITE On
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^\.]+)$ $1.php [NC,L]

</IfModule>

ErrorDocument 404 /subsite/www/site/404.php

and here are the contents of the original file in my localhost version (which works just fine):

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

ErrorDocument 404 /subsite/site/404

in XAMPP, on Win 7 64-bit, so the root folder being /htdocs, and in /subsite/ there's stuff like notes and psd files.

I have no experience with GoDaddy but I've tried all solutions on this page http://davidwalsh.name/mod_rewrite-htaccess-godaddy including the comments up to that of "Luna"'s... to no avail (still hoping I might come across a successful solution in the rest of the comments). Anyone have any idea what I can do about this? Please? It would be so helpful not to have to work around this.

The RewriteRule and ErrorDocument both aren't working.

Thank you kindly.

Dani AI

Generated

Most likely causes (in order of probability): the add-on/domain is pointed at a different document root than the folder you uploaded to, a default index.html placeholder in the parent root is taking precedence, or Apache simply isn't reading the .htaccess you placed (wrong directory, wrong filename, wrong hosting type). 's observation that your index.php is reachable only when you include the /www/site path strongly suggests a document-root mismatch.

Quick troubleshooting checklist you can run now:

  • Confirm the public document root for the domain (control panel "Domains"/"Addon Domains" or equivalent). If you cannot find it, use a tiny PHP file to print what the server thinks the web root and request are:

    <?php
    echo 'DOCUMENT_ROOT: ' . $_SERVER['DOCUMENT_ROOT'] . "\n";
    echo 'REQUEST_URI: ' . $_SERVER['REQUEST_URI'] . "\n";
    ?>

    Place that file where you think the domain root is and open it in a browser.

  • Look in the domain root for a placeholder index.html (the GoDaddy "future home" page). If present it will win over index.php unless you change DirectoryIndex order or remove/rename the placeholder.

  • Make sure .htaccess is actually named with the leading dot, uploaded as text (no BOM), and located in the directory that corresponds to the domain’s public root. If you put it in a subfolder, it only affects requests that reach that folder.

  • Check Apache error logs (hosting panel) after a request — .htaccess parse errors and path problems show up there.

Notes specific to rewrites and ErrorDocument:

  • RewriteBase must match the URL path to the folder containing the .htaccess. If your site is served from /site/ in the URL, set the base accordingly; if the site is the domain root, use /.
  • ErrorDocument paths are web paths relative to the domain root (start with /), not filesystem paths.
  • Confirm you are on Linux/Apache hosting; Windows/IIS hosting does not use .htaccess.

If those checks still don't help: clear browser cache, test with curl to avoid client caching, then contact GoDaddy support with the exact domain, the path you uploaded to, and a snippet of your .htaccess — ask them to confirm the domain's document root and whether .htaccess files are being honored.

Okay maybe the issue is as described here: -- i.e., changes to htaccess file take time to take effect.

If that's the case what would any of you who have considerable experience with GoDaddy suspect to be the culprit in my .htaccess, given my aforementioned configuration?

Thanks much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.