Help: where is .htaccess located? I want to use for 301 domain to domain

My first time using Cyberpanel thru Linode and I’m not that techie person. I almost spent the whole day figuring out how to import 1Gig sql files because my.cnf are hiding or not existing in /etc/mysql/ :frowning: so I have to create and upload there and good thing is it is working.

Now I want to redirect my old domain or site to a new one. My old server is Nginx so I just look on conf.d. I hope you can help me out guys. Sorry for my english, its not my first language.

On site public_html folder

hi, thanks for the reply, but I can only see index.html on public_html folder, no other files except index.html. No .htaccess there. Or maybe in hide? How to unhide?

Then you can just create one.

in default site there is no htaccess as only one page is there

Not just the default, all 7 sites I created has no htaccess on them

When you install wp on site it will create .htacces file

I’m not installing them, migrating thru ftp to ftp since these sites are way old. They are all from Nginx server

Okay I try to install wordpress from the panel ( APPLICATION INSTALLER) but still no .htaccess . Is there something wrong with my account? No .htacces, no my.cnf, etc

I’m trying dedicated server from Linode.


At first, your description about what you want to achieve is not 100% clear. But here is some info:

  1. When migrating from one hosting panel to another hosting panel, you can also copy and use the .htaccess from the “old sites”, as you say.
  2. If there is a problem with the .htaccess file, just go and create one. In the file manager, click Create New File, name it “.htaccess” and put the following lines inside:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
  1. .htaccess files in general have nothing to do with Cyberpanel, their automatic generation is a Wordpress specific task.

If there is htacces file missing Wordpress will create new one by go wp-admin|settings|permalinks and then click save without doing changes.