.htaccess or custom php
Posted: Tue Mar 26, 2013 7:05 pm
Hi all,
I need to create either redirects hardcoded through htaccess file in cmsmadesimple.
First:
Is it the correct file location, for the htaccess file: In the /doc folder?
I inserted a redirect there, but with no effect. And also: how come it is not in the root folder?
Second option:
I have created a PHP function, that holds an array of all the urls I need to redirect. I inserted the PHP code, in the very top of the index.php page, but it didnt redirect anything? I did tjeck the function, and it is working fine..
To insert custom PHP code, before any of the page is rendered: Is it correct to do that through the index.php file. Or is it in another file that is included in the header of the site?
Any help is highly appreciated in this matter.
Best regards, Jan
I need to create either redirects hardcoded through htaccess file in cmsmadesimple.
First:
Is it the correct file location, for the htaccess file: In the /doc folder?
I inserted a redirect there, but with no effect. And also: how come it is not in the root folder?
Second option:
I have created a PHP function, that holds an array of all the urls I need to redirect. I inserted the PHP code, in the very top of the index.php page, but it didnt redirect anything? I did tjeck the function, and it is working fine..
To insert custom PHP code, before any of the page is rendered: Is it correct to do that through the index.php file. Or is it in another file that is included in the header of the site?
Any help is highly appreciated in this matter.
Best regards, Jan