Rajeev Dotmappers
Rajeev Dotmappers

Reputation: 15

.htaccess file is not recognized by PHP website

I want to redirect

 http://mywebsite.com/ 

to

 http://www.mywebsite.com/

I want to highlight that these are 2 different pages, in non www version,we have thank you message only, but www version is the actual page we wanted to show it to customer.

Problem is that when I am trying to use .htaccess file through FTP, it is not recognizing the .htaccess file.

This website is made up on PHP. I tried meta tags redirection too, which result in blank page as it have default tags in all page.

Any help would be highly appreciated. Thank You.

Upvotes: 0

Views: 144

Answers (2)

Gerald Schneider
Gerald Schneider

Reputation: 17797

If .htaccess is not an option you can do the redirect in PHP:

<?php
header("Location: http://www.mrquickwhip.com.au/", true, 301);
?>

Upvotes: 1

JimiDini
JimiDini

Reputation: 2069

.htaccess is not a feature of PHP. it is a feature of Apache http server. so, options are:

  1. the host doesn't use Apache (and uses nginx — headers actually confirm this version)
  2. even if it Apache, htaccess parsing is disabled.

In both cases, you should contact server administrators for support

Upvotes: 1

Related Questions