Title: htaccess issue.
Last modified: August 18, 2016

---

# htaccess issue.

 *  [Shelby DeNike](https://wordpress.org/support/users/sdenike/)
 * (@sdenike)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/)
 * So here is the setup. I have wordpress installed in the root public_html/ directory.
   I am making use of permalinks that are much like sitename.com/archive/post/date/
   etc… Anyways in the public_html/ directory I also have a “catalog/” directory
   which in there includes and install of OSCommerece. All works fine except for
   when i try to load sitename.com/catalog/admin.php, this returns the default WordPress
   404 Error page. This sucks because with out access to that file which IS there
   I cant admin the shopping cart software. I have removed the .htaccess from public_html/
   and all works frin… except that all wordpress links are now sitename.com/?p=1
   etc. Is there a way to edit the htaccess to not include the catalog directory?
   I am not all that good with mod_rewrite and making use of the .htaccess, thanks.

Viewing 15 replies - 1 through 15 (of 15 total)

 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394268)
 * Could you post the entire contents of the .htaccess?
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394283)
 * You probably need to add this to your .htaccess:
    `RewriteCond %{REQUEST_URI}!
   ^/catalog/`
 * But post the whole thing so everybody can be sure.
 *  Thread Starter [Shelby DeNike](https://wordpress.org/support/users/sdenike/)
 * (@sdenike)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394342)
 * Its just the default .htaccess file that WordPress Creates. I will post it if
   required but….
 *  Thread Starter [Shelby DeNike](https://wordpress.org/support/users/sdenike/)
 * (@sdenike)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394343)
 * # BEGIN WordPress
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond%{
   REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.
   php [L] </IfModule>
 * # END WordPress
 *  Thread Starter [Shelby DeNike](https://wordpress.org/support/users/sdenike/)
 * (@sdenike)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394350)
 * Otto, I tried to add that line … and no go. Anyone else have an idea on how to
   make the main htaccess ignore anything in the catalog/ directory, more importantly
   the catalog/admin/ directory.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394361)
 * Actually, with those lines, you shouldn’t be going to wordpress anyway. The first
   RewriteCond checks that the URL isn’t referring to an existing file, the second
   checks that it’s not referring to an existing directory. So if the catalog directory
   exists and you reference it in the URL, then it should not redirect to index.
   php and wordpress should not get involved.
 * Are we sure that rewriting is working in the first place here? Do your permalinks
   work normally? How about permissions on the directory and files? Are they correct?
   How about capitalization? These things are case sensitive.
 *  Thread Starter [Shelby DeNike](https://wordpress.org/support/users/sdenike/)
 * (@sdenike)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394416)
 * This is the default .htaccess created by WordPress 2.0. I have not made any adjustments
   to the settings of the .htaccess. the catalog/ directory works just fine and 
   so do all the files in it. only problem is when you try to access catalog/admin/
   then it gives you the default WordPress Main page not the 404 like I thought 
   before. The permalinks are working just fine its jsut that it for some reason
   messes up the catalog/admin/ directory. If I remove the .htaccess then everything
   works just fine, except that the urls look horrible since they are not /page/
   they are instead /?p=123 etc….
 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394495)
 * Where did you put `RewriteCond %{REQUEST_URI} !^/catalog/`?
 * If it was me, I’d try it here:
 * `# BEGIN WordPress
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond%{
   REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI}!
   ^/catalog/ RewriteRule . /index.php [L] </IfModule>
 * # END WordPress
 * Sorry, don’t know how much you know about .htaccess 😉
 *  Thread Starter [Shelby DeNike](https://wordpress.org/support/users/sdenike/)
 * (@sdenike)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394614)
 * maerk, that is exactly where I put it and still no go. when I goto the catalog/
   admin/ directory it loads themain wordpress page…. any other ideas? And yeah 
   when it comes to htaccess I am a big newb.
 *  [syncbox](https://wordpress.org/support/users/syncbox/)
 * (@syncbox)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394654)
 * Be sure you put it before any other rules in .htaccess
 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394660)
 * Try this:
 * `# BEGIN WordPress
    <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond%{
   REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI}!
   ^.*catalog.*$ RewriteRule . /index.php [L] </IfModule>
 * # END WordPress
 * The downside here is that any URI with the string `catalog` won’t be rewritten,
   but it’s worth a shot, even if only for debugging issues.
 *  Thread Starter [Shelby DeNike](https://wordpress.org/support/users/sdenike/)
 * (@sdenike)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394687)
 * maerk that worked. Thanks!
 *  [maerk](https://wordpress.org/support/users/maerk/)
 * (@maerk)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394689)
 * Excellent! But you should be aware that any URL containing the string `catalog`
   won’t be rewritten. So if you have a post with, say, “Take a look at this catalog”
   as the title, you’ll get a not found error.
 * This might be a better shot to avoid that problem:
 * `RewriteCond %{REQUEST_URI} !^catalog/?$`
 * But if not, change it back and just avoid the word “catalog” (or any word containing“
   catalog”) in anything that might generate a URL — post title, category name, 
   etc.
 *  [mangia](https://wordpress.org/support/users/mangia/)
 * (@mangia)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/htaccess-issue/#post-394760)
 * I have one problem with htaccess. I made file and enter only this inside:
    <IfModule
   mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME}!-
   f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ./index.php [L] </IfModule>
   I uploaded it to the server in ASCII mod to my www dir. It is root dir for website
   and indeh.php is in that dir. , but I cant go to to my site. It back me 403 forbidden
   error. Any idea? I’m using only wp 2.x version. When I erase .htaccess file it
   works OK but links are with ? and numbers
 *  [mactory](https://wordpress.org/support/users/mactory/)
 * (@mactory)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/htaccess-issue/#post-394779)
 * Since this didn’t work for me either:
    RewriteCond %{REQUEST_URI} !^catalog/?
   $ but this did: RewriteCond %{REQUEST_URI} !^.*catalog.*$
 * I just tried joining them like this:
    RewriteCond %{REQUEST_URI} !^.*/catalog/.*
   $ and it actually worked for me. I never did anythig with this .htaccess stuff
   before, but I think it works for me now. Only links with ‘/catalog/’ in it will
   be excluded, so the ones with ‘catalog’ in the title should be fine!

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘htaccess issue.’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 15 replies
 * 6 participants
 * Last reply from: [mactory](https://wordpress.org/support/users/mactory/)
 * Last activity: [19 years, 1 month ago](https://wordpress.org/support/topic/htaccess-issue/#post-394779)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
