Dr.T. Posted May 22, 2011 Share Posted May 22, 2011 Colleagues, In my website (www.afr-research.com), the home page (index.htm) is stored in the “public_html” folder. In the same folder, there is a page named “language_survey.htm”. Here’s the home page’s code: <?php header('Location: http://www.afr-research.com/language_survey.htm'); ?> I can open “www.afr-research.com/language_survey.htm” directly but redirect does not work. Why? Thank you. Dr. T. Quote Link to comment https://forums.phpfreaks.com/topic/237112-help-w-redirect/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 22, 2011 Share Posted May 22, 2011 Has your web server been configured to parse and execute php code that is inside a .htm file? By default, only .php files are treated as php code. Quote Link to comment https://forums.phpfreaks.com/topic/237112-help-w-redirect/#findComment-1218676 Share on other sites More sharing options...
Dr.T. Posted May 22, 2011 Author Share Posted May 22, 2011 Thank you! I changed the file extension of the index page to .php and it worked! :-) Dr. T. Quote Link to comment https://forums.phpfreaks.com/topic/237112-help-w-redirect/#findComment-1218788 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.