user13467754
user13467754

Reputation:

I accidentally deleted my .htaccess file how to get it back?

I started using wordpress with my website (through 000webhost) and then I realized that's not really what I want. Not at all. So I went through and deleted all the files. There was a .htaccess file (for Wordpress) and one called .htaccess_origional. I accidentally deleted the original one and now I'm stuck with a Wordpress one that won't work. It was a file with no restrictions or modifications. I remember that it only had one line. Does anybody know how to get it back? Thanks in advance!

Upvotes: 0

Views: 9003

Answers (3)

Solayman Haider
Solayman Haider

Reputation: 76

You just have to visit Settings > Permalink and save. It will re-generate the .htaccess file.

Upvotes: 3

Joeri
Joeri

Reputation: 646

It's been a while since I last used their service but if I recall correctly you can rebuild your webdir (or whatever it's called).

You'll have to search for this function in your control panel.

When you click this it will reset your server so BE SURE TO HAVE A BACKUP.

Upvotes: 1

Sagar Bahadur Tamang
Sagar Bahadur Tamang

Reputation: 2709

If you want to create the initial .htaccess file configuration. Here is the initial .htaccess configuraiton

# 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

Reference: https://www.hostinger.com/tutorials/create-default-wordpress-htaccess-file

Upvotes: 1

Related Questions