can I have .htaccess on shared linux server

rgb192 used Ask the Experts™
previous answer to

If you mean what I think you do, you can set up a .htaccess file to do this. In there, you can create a rule to redirect users to a specific url. So, if they type in it will redirect to

can I do this with my server
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fractional CTO
Distinguished Expert 2018
Almost every shared server system allows access to .htaccess files.

Likely you'll access your .htaccess through SFTP.

Note: Best to first make a backup copy, before making changes as any minor .htaccess syntax error in the site's DocumentRoot, will take down entire site... meaning... entire site will throw a 500 Internal Server error.
Dr. KlahnPrincipal Software Engineer
can I do this with my server

If the server is Apache or Apache-based, yes.

However, for a rule that is to be applied on all URLs, it is (imo) better to apply it in httpd.conf, not in .htaccess.



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial