Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Where to put .htaccess file to do a redirect

Created: 17 Jun 2013 | 2 comments
John923's picture

I need to redirect my website to a non www. URL by using an .htaccess file.

Please say where to put .htaccess file to do a redirect or suggest any other ways this could be done. I tried /usr/local/nukona and /usr/local/nukona/www - its a CentOS on-prem server.

I tested to see if it is using the .htaccess file by putting junk/erroneous data in it and seeing if it errors.

The reason is that we only have certificates for the non www. URL so users go to the www. URL get a SSL warning.

Many thanks

John

Operating Systems:

Comments 2 CommentsJump to latest comment

Andrew_C's picture

Hi John,

Could you please provide clarification on what the current problem is, and the goal you wish to accomplish? I don't believe an .htaccess redirect is the path you want to take, and is unlikely supported. Typically, the desired FQDN should be handled / routed via DNS, and the server's associated SSL certificate should match the appropriate FQDN.

If you could provide more detail, hopefully I can assist in a solution

Regards,

Andrew

 

John923's picture

Hi Andrew,

Basicly getting an SSL certificate warning when users browse to the www URL for our site.

I managed to get the .htaccess file to function however it still did not solve the problem as a different warning (redirect warning) was shown.

I think what you say is right i.e. get the right certificate for the domain and in our case to get a wildcard certificate to handle www and non www.

Many thanks