Skip to main content

Moving From htaccess to .conf includes

Comments

1 comment

  • cPanelMichael
    Hello, We document the steps on custom VirualHost includes at: Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation
    Is it ok that the directory created and file rewrite.conf within it, are created using root?

    Yes, it's fine to create this files and directories as the root user.
    Do I just paste my .htaccess into it? I tried that, and it failed. Or do I need to still create a full structure as an include, even though its an include within the existing virtual host?

    You don't have to replicate the full VirualHost entry in the include file. Includes are the last directives in each virtual host. An include file's contents will override any value that exists in the primary configuration file. Could you provide an example of a specific .htaccess rule you are attempting to configure in the VirtualHost for a domain name? Thank you.
    0

Please sign in to leave a comment.