BuildMyWeb Posted July 21, 2015 Share Posted July 21, 2015 i frequently use .htaccess files for some basics but i am very newbish in my understanding. what i am trying to do is setup permanent redirects for old file names to new ones on the same server/domain. the line below typically works for me but i cannot get any success on a particular client's account. it is a GoDaddy shared hosting Linux server. has apache and other .htaccess directives are working. i have been researching online about this and so have tried numerous alternatives such as redirectmatch-es and RewriteRule-s. not that i understand the aforementioned well but read an article on two that explained things fairly well and so gave it a shot but no luck. i did find a bunch of statements alluding to some changes GoDaddy made that require the inclusion of subfolders in the command but had no success with it. this domain, mysite.com, is setup as a subdomain (in 'subfolder') under what GoDaddy is calling the 'root' directory. Redirect /subfolder/old_file.php http://mysite.com/subfolder/new_file.php Link to comment https://forums.phpfreaks.com/topic/297411-htaccess-redirect-301-problems/ Share on other sites More sharing options...
scootstah Posted July 21, 2015 Share Posted July 21, 2015 Is mod_alias enabled? Do you have access to the redirect logs? Do you have any errors? Link to comment https://forums.phpfreaks.com/topic/297411-htaccess-redirect-301-problems/#findComment-1517011 Share on other sites More sharing options...
BuildMyWeb Posted July 21, 2015 Author Share Posted July 21, 2015 Is mod_alias enabled? Do you have access to the redirect logs? Do you have any errors? i searched a phpinfo() file for mod_alias but didnt find it. where can i see if this is enabled? dont know where to find redirect logs? i looked in my cpanel but not there. no onscreen errors. other than the 404. i AM being directed to my custom 404 page which leads me to believe .htaccess is working, in general. Link to comment https://forums.phpfreaks.com/topic/297411-htaccess-redirect-301-problems/#findComment-1517013 Share on other sites More sharing options...
BuildMyWeb Posted July 21, 2015 Author Share Posted July 21, 2015 im assuming i might need true root access to check if mod_alias is enabled after reading this: http://serverfault.com/questions/568267/how-to-check-if-mod-alias-is-enabled but godaddy does not allow for that in their shared hosting plans, i dont believe. Link to comment https://forums.phpfreaks.com/topic/297411-htaccess-redirect-301-problems/#findComment-1517015 Share on other sites More sharing options...
scootstah Posted July 21, 2015 Share Posted July 21, 2015 If mod_alias is enabled it should show up in phpinfo() next to the other loaded Apache modules, like mod_rewrite. Since you have cPanel, have you tried setting up the redirect from there? Link to comment https://forums.phpfreaks.com/topic/297411-htaccess-redirect-301-problems/#findComment-1517016 Share on other sites More sharing options...
BuildMyWeb Posted July 21, 2015 Author Share Posted July 21, 2015 mod_alias did not show in my search of phpinfo. ill speak to godaddy about this. i havent tried setting up the redirects in cpanel because there are many. and i was hoping i might learn something new from this exercise. Link to comment https://forums.phpfreaks.com/topic/297411-htaccess-redirect-301-problems/#findComment-1517027 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.