[RESOLVED] URGENT help needed: .htaccess not forwarding!
Apache linux server hosted on GoDaddy, I have an .htaccess file that points old URLs to new URLs as we just rebuilt the site. It does not work as hit an old page and you just get the 404 page and not redirected to the new page location. I fear, if we do not get on this quick, we will loose SE placement for links we have in the search engines.
here is the first part of the file.. it has about 20 more lines exactly the same. do you see an error? I do not. Seems perfectly setup. This must be some server issue, no? Thoughts?
all this is in a txt file with name .htaccess.txt and then FTP to the server and then rename to .htaccess where it becomes invisible. Though, I do use an FTP app that allows me to see invisible files. So, I know it is there, name is correct.
I use a mac, so I open TextEdit and then save - Unicode UTF-8 - it to the desktop as .htaccess - but "." is reserved for system files, so I have to use an app that lets me see hidden files on the desktop. I can then grab it and carry it to the server.
btw, are you understanding that it is NOT on the server as .htaccess.txt?? I just save it that way locally so I can work on it because of above issue. once I transfer it to the server, I rename it to just .htaccess
as expected.. I went over to a PC and did it the way you said.. does not work. One can make an .htaccess file on a mac or pc. TextEdit or Notepad should not matter. also, I think you helped me with a php issue I had that required a .htaccess file and I made like I made this first one and it worked fine. but in this case.. it is not working. almost makes me wonder if it is a server issue.
I remember for godaddy, there were different ways of writing them...
Hang on... I did one for godaddy that redirected all old/dead pages to the homepage instead of a 404
Here is my .htaccess that works on Godaddy to redirect all dead pages to our homepage instead:
Code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
but that is a full site redirect, why wouldn't you want to do page by page, one by one and get the pages sent to their correct new page and not generically the home page. I mean, if it is a custom 404 page or the home page, does that really matter? the goal would be to get old pages sent to their new page location, no?
when I use your method, it redirects to the home page BUT the page does not load the CSS file and so the page is just text. if I go back to my version, it allows the nice custom 404 page to be found, but does not redirect them to the right new page!! how is that even possible. it is like the .htaccess file is recognized, since your kicked it over to the splash page al right, but something is whack in that the splash page has no css and yet my version kicks them to the 404 page which looks perfect, but does not kick them to the correct NEW page.
as expected.. I went over to a PC and did it the way you said.. does not work. One can make an .htaccess file on a mac or pc. TextEdit or Notepad should not matter. also, I think you helped me with a php issue I had that required a .htaccess file and I made like I made this first one and it worked fine. but in this case.. it is not working. almost makes me wonder if it is a server issue.
I would be willing to bet it's a GODADDY issue,
but do not despair, you can get EVERYTHING to work on Godaddy...
sometimes it takes an alternate .htaccess file, or a php.ini file.
when I use your method, it redirects to the home page BUT the page does not load the CSS file and so the page is just text. if I go back to my version, it allows the nice custom 404 page to be found, but does not redirect them to the right new page!! how is that even possible. it is like the .htaccess file is recognized, since your kicked it over to the splash page al right, but something is whack in that the splash page has no css and yet my version kicks them to the 404 page which looks perfect, but does not kick them to the correct NEW page.
Strange, works fine on a page I put it on (not mine)...
You can write any jibberish after the URL and it will go to the homepage... with a message that the page you seek has been moved... http://www.gladstonellc.com/yada-yada
For this site, this was a perfect solution as much old and dated material was finally cleared out for new content... old company newsletters, photos, etc.
Works.
Last edited by donatello; 11-18-2009 at 04:34 PM.
Reason: spelling :(
Wait until the TOP OF THE HOUR!!!
I forgot all about this as it drove me MAD once!!!
Go and have a beer or coffee and come back at 1 minute after the hour...
NOTE: Due to server caching, new .htaccess files may take up to one hour to be recognized.
Changes to existing .htaccess files are picked up immediately.
Bookmarks