cant edit .htaccess in file manager

Status
Not open for further replies.

topthisfact

New Member
Messages
10
Reaction score
0
Points
0
hey
for some reason i cant find .htaccess or create a file called .htaccess inside my file manager.
i tried uploading my old .htaccess to my public_html in FTP but it doesn't sem to work because it suppose to redirect the link without www. to www.
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
hey
for some reason i cant find .htaccess or create a file called .htaccess inside my file manager.
i tried uploading my old .htaccess to my public_html in FTP but it doesn't sem to work because it suppose to redirect the link without www. to www.


The .htaccess is hidden file, So in your cpanel click on "reset all interface settings " at the bottom and then open filemanager

select the tickmark "show hidden files"
then you can access the .htaccess file


the code for redirecting without www to with www

RewriteEngine on

RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

Check it
 

topthisfact

New Member
Messages
10
Reaction score
0
Points
0
ohs
i've done this part

"The .htaccess is hidden file, So in your cpanel click on "reset all interface settings " at the bottom and then open filemanager"


But after i open file manger, i dont see a tickmark saying "show hidden files"

where is it located? because i cant find it
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
ohs
i've done this part

"The .htaccess is hidden file, So in your cpanel click on "reset all interface settings " at the bottom and then open filemanager"


But after i open file manger, i dont see a tickmark saying "show hidden files"

where is it located? because i cant find it

When you click on filemanager It shows a small dialogbox in that "show hidden files(dot files)" will be there yo need to select that then click Go

Now it shows the .htaccess file
 
Last edited:
Status
Not open for further replies.
Top