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

---

# ghost .htaccess

 *  [rwt](https://wordpress.org/support/users/rwt/)
 * (@rwt)
 * [20 years, 12 months ago](https://wordpress.org/support/topic/ghost-htaccess/)
 * I have read the numerous posts on .htaccess problems, yet as far as I could tell
   the situation I am about to describe may be unique.
 * I havent had any trouble with my .htaccess file. Things have been going great.
 * Well I was playing with it the other day, just wanted to understand it a little
   better and added a line. Refreshed my site. It didnt take affect. I played around
   some more. At one point, i backed it up and then deleted the original. I was 
   expecting several items to be hosed (if not the whole site). The site still worked.
   Intriquing to say the least.
 * Currently, i do not have an .htaccess file in my WordPress installation. At least,
   not one that I can see. I don’t have regular FTP access to any site from the 
   computer I work on during the day, soI use the file manager via cPanel to look
   at my directory. My first question: can the .htaccess be hidden from cPanel?
 * Within WordPress, if I go to Manage/Files and try to access the .htacess file
   I get:
 * “You don’t have permission to access /mydirectory/wp-admin/templates.php on this
   server.
 * Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument
   to handle the request. “
 * To me this message is confusing. Do I not have permission? Or does the file not
   exist?? Or is it because it doesnt exist, i dont have permission! However, if
   I enter in dummy file names, it gives me the typical, File Does Not Exist error
   within wordpress itself.
 * I am suspecting that my host has control over my .htaccess file or has taking
   over access of it since I know I have accessed it before.
 * Anyone ever experience something like this? There isnt a problem currently, everything
   works just fine. I can post, add pages, etc. But in the future I would like to
   be able to have direct access to that file again.

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

 *  Thread Starter [rwt](https://wordpress.org/support/users/rwt/)
 * (@rwt)
 * [20 years, 12 months ago](https://wordpress.org/support/topic/ghost-htaccess/#post-207589)
 * Well here is the wonderful answer from my hosting company:
 * >  No there is no way to hide the .htaccess file in the file manager.
 * Still in search of the phantom .htacess file…
 *  Thread Starter [rwt](https://wordpress.org/support/users/rwt/)
 * (@rwt)
 * [20 years, 12 months ago](https://wordpress.org/support/topic/ghost-htaccess/#post-207606)
 * OK…another test…
 * I blanked out the .htaccess file: website still works.
    I put gibberish in .htaccess
   file: website fails. I blank out .htaccess file again: website works. If I add
   new rules: changes dont go into effect. If I add gibbersih: it seems to read 
   it and tanks everything.
 * What only recognize gibberish?
 * Does this get back to AllowOveride All? But if it was set to AllowOverride None
   then the gibbersih would not even have an effect (at least thats my understanding,
   heck Apaches own site even says so.)
 * Even though it is blanked out, it still retains all the permalink and such. Is
   this just me and my lack of true understanding or is this weird?
 * Is WordPress retaining its own setting somewhere else????
 *  [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [20 years, 12 months ago](https://wordpress.org/support/topic/ghost-htaccess/#post-207608)
 * Are you talking about the .htaccess in your SITE root, or in the WP root? If 
   you put gibberish in the WP root folder file, it wouldn’t bork your whole site,
   just the WP install.
 *  Thread Starter [rwt](https://wordpress.org/support/users/rwt/)
 * (@rwt)
 * [20 years, 12 months ago](https://wordpress.org/support/topic/ghost-htaccess/#post-207624)
 * I have a couple of blogs. In one, WordPress is install in a subdirectory. In 
   the other, WordPress is installed at the root. The behavior described occurs 
   with both. Both sites are hosted on the same host.
 * There is an .htaccess file that resides outside the main directory for each site.
   I’ve comtemplated whether this was the problem. However, it never has been a 
   problem in the past. Its contents are as follows:
 * # -FrontPage-
 * IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
 * <Limit GET POST>
    order deny,allow deny from all allow from all </Limit> <Limit
   PUT DELETE> order deny,allow deny from all </Limit> AuthName [http://www.siteone.com](http://www.siteone.com)
   AuthUserFile /home/mysites/public_html/_vti_pvt/service.pwd AuthGroupFile /home/
   mysites/public_html/_vti_pvt/service.grp
 * RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://sitetwo.com/.*$ [NC] RewriteCond%{
   HTTP_REFERER} !^http://sitetwo.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://
   siteone.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://siteone.com$ [NC] RewriteCond%{
   HTTP_REFERER} !^http://www.sitetwo.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !
   ^http://www.sitetwo.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.siteone.
   com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.siteone.com$ [NC] RewriteRule.*\.(
   jpg|jpeg|gif|bmp)$ – [F,NC]
 *  [Cypher](https://wordpress.org/support/users/cypher/)
 * (@cypher)
 * [20 years, 12 months ago](https://wordpress.org/support/topic/ghost-htaccess/#post-207626)
 * Your permalink structure as the word “index.php” in there, so it will work FINE
   without a .htaccess file. But having broken stuff in the file will nicely break
   your website.
 * Go to options->permalinks under Admin section, look at your permalink structure
   and remove “index.php” from the structure, then save the options.
 * Now go through your site, if you blank your .htaccess, your site will break.
 * Using “index.php” is a hack to allow you to get nice-links without the use of.
   htaccess file.
 * Regards
 *  Thread Starter [rwt](https://wordpress.org/support/users/rwt/)
 * (@rwt)
 * [20 years, 12 months ago](https://wordpress.org/support/topic/ghost-htaccess/#post-207631)
 * Back in the dustbin of my mind I recall knowing this. Unfortunately, I knew it
   way back when I originally set up the sites. In the end then, I was just confusing
   myself because I had forgotten I had used the index.php hack. Thanks.
 *  [Cypher](https://wordpress.org/support/users/cypher/)
 * (@cypher)
 * [20 years, 12 months ago](https://wordpress.org/support/topic/ghost-htaccess/#post-207634)
 * You’re welcome. 🙂
 * Regards

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

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

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [Cypher](https://wordpress.org/support/users/cypher/)
 * Last activity: [20 years, 12 months ago](https://wordpress.org/support/topic/ghost-htaccess/#post-207634)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
