• Hi,
    Here I’m facing one issue from long time I want to edit my .htaccess file and I need to add some code in it from the cPanel I did it and saved but the thing is the code which i have added to that file is not saving into .htaccess file can any one help me solving this issue.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • It is hard to provide support without knowing the code you are trying to add to your sites .htaccess. Sometimes the code does not belong in the htaccess file. Please provide further info about what you are trying to add to your htaccess and I will do my best to help you, if I am not able to someone else here in the community might be able to.

    Thread Starter banothuthiru

    (@banothuthiru)

    Hi Davood Denavi,

    Thank for your response .

    I need to add some code that is related “expire headers” & Directory Listing enable.

    This still doesn’t allow us to help you very well… do you have the code you’re adding? Please share it.

    Also, the code might be different based on your hosting/server provider. You might be better off contacting your provider for support.

    Thread Starter banothuthiru

    (@banothuthiru)

    Hi Davood Denavi,

    I need to add the following code : Optional -Indexes
    to .htaccess file need to save it permanently

    htaccess is directory specific so you will need to add the exact line you just shared into an htaccess file for each directory you want that option to be active for. Where it comes to adding it to htaccess you have the correct line that needs to be added. I usually add it to the bottom of the file if there is other code in the htaccess for the directory I am adding it to. Beyond that the only way it will not be added permanently is if you or someone else helping you manage the website accidentally deletes the htaccess file from a specific directory.

    Thread Starter banothuthiru

    (@banothuthiru)

    Hi Davood Denavi,

    Thanks for your response
    I have added those line end of the htaccess file and saved it by that time it shows saved but the thing is when perform the action its remains none if i open the htaccess file the code which I added disappeared please help me.

    the htaccess file must be saved with a period in front of it (.htaccess) else the code inside of it is ignored by most servers. Also, I’ve had experiences where the code you are trying to implement needs to be at the top of the .htaccess file due to a server configuration issue in order to not be ignored. One last thing I would suggest is to contact your hosting provider and ask theme if there is another way to add this setting without editing the htaccess file… I did work with one client in the past who’s hosting provider had a custom option available server-side that was able to do this outside of the htaccess file using a checkbox within the control panel.

    This is a volunteer based forum so beyond the advice and guidance I’ve already provided I will not be able to help much further. However, another volunteer here might have insight and knowledge different from mine based on their experience with such issues as you are describing.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘.htaccess File’ is closed to new replies.