Need Help with Root Level htaccess

A client of mine is using apollohosting.com and I accidentally deleted the .htaccess file listed below, which sits in the root level.

.htaccess
domain.com
cgi-bin
httpsecure
stats

I have WordPress setup (domain.com folder) and before the deletion, the pages were working fine, but now when I click them, they’re giving me 404 errors.

I have to assume that there was directive in this root level .htaccess versus the default WP one that lives in domain.com folder.

Can anyone help me out with what needs to be in this root level file?

Thanks

RS,

The common WP .htaccess (corrected) is:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME) !-f
RewriteRule .? index.php [L]

What I’ve deleted does NOT belong in their code, i.e., RewriteBase, RewriteCond %{REQUEST_URI} !index\.php and absurdly wasteful <IfModule> wrapper.

Because you’ve move your WP installation, you may need to change the RewriteRule to point to /domain.com/index.php.

Regards,

DK

The issue i’m talking about refers to an .htaccess in the parent folder above domain.com where the wordpress install lives.

.htaccess (here)
domain.com (not here, where WP is)
cgi-bin
httpsecure
stats

RS,

Anything “above” a domain is not accessible by HTTP so its .htaccess is not read. Typically, hosts provide a structure like:

~account
– cgi-bin
– www (or public_html)
----- subdomains
----- add-on domains
– logs, etc.

In this structure, www (or public_html) is where the main domain is located (add-on domains and subdomains are in subdirectories of www).

IF www is where you’re trying to install .htaccess, that’s correct (for the main domain, NOT for subdomains/add-ons as they “skip over” the main domain’s DocumentRoot).

Please define your structure - at least where domain.com (registered domain or merely a subdirectory???) is located in this structure.

Your actual domain name is irrelevant.

Regards,

DK

Yes, www (domain.com) is where my main domain / wordpress root level would be.

I uploaded your code to that spot and it works for the pages, but the CSS is not rendering. Without the file, the homepage loads with style, but shows a 404 on all subpages.

RS,

The obvious question is “Where is the css file located (in your physical structure)?” It MUST be in the same place as the WP css file and called in the same manner (it’s protected from redirection because of the !-f).

Regards,

DK

domain.com/wp-content/themes/alternatewp/style.css is the location of the css. When I browse to it, i’m getting a 404 error. When I FTP to it, I can physically see the file there.

RS,

And your .htaccess is simply the code I repeated for you above?

index.php is located in the DocumentRoot (at domain.com, NOT wp-content)?

Regards,

DK

Yes, both .htaccess and index.php are in the root level.

???

Regards,

DK

These items are in the root level folder structure like this…

.htaccess (with your code)
index.php
/wp-content/themes/alternatewp/css/style.css

RS,

Okay, thanks. However, I’ve got to assume that wp-content is the location of WP’s index.php file handler. That means that I was not sufficiently specific in asking for the location of index.php (WP’s, not a website welcome like a flash intro). If this is a correct assumption, then you’ll have to move the .htaccess to the wp-content directory and make sure that your “flash intro page” links to the WP installation’s index.php.

Well, with that, color me totally confused about your WP installation.

Regards,

DK