SugarChick
02-07-06, 04:56 PM
If something needs to be explained or in further detail please let me know.
I have a site that works fine using a .htaccess file that changes links so they are search engine friendly(symbolic links).
It looks something like this:
php_flag session.use_trans_sid off
RewriteEngine On
RewriteRule ^info/(.*).html$ page.php?pg=info&cont=$1 [L,NC]
The 'pg' switch is setup like this:
case info:
include("inc/".$cont.".php");
break;
So going to http://www.site.com/index.php?pg=info&cont=file (which would take me to file.php located in the inc folder) it looks pretty like http://www.site.com/info/file.html
This works fine on my current host, I have many redirects setup this way and they work fine.
My problem is that I uploaded the same files to the new host and it does not work - I get a 404 page error.
If I go to http://www.site.com/ewrwrwer (my current host) I get a default IE "page cannot be displayed". If I go to http://www.newsite.com/werwerew (the new host) I get a 404 error.
I think my problem is that somehow the new site is seeing that a file doesn't exist before it hits the htaccess file so it kicks it out to a 404 page. I figured maybe if I changed it so that the symbolic link was going to an actual directory (http://www.site.com/inc/file.html) instead of (http://www.site.com/info/file.html) that it would work. But it still does not, I think this is because it sees file.html as an nonexistant file.
The only difference that I could see from the old server to the new server is that in phpinfo under "server api" the new server has "CGI" whereas the old server has "apache" though they both run apache.
The other odd thing is that if I include this in the .htaccess file "php_flag session.use_trans_sid off" it gives me a error 500 page.
I have talked to the host and there is no way to remove that 404 page, though I can use the .htaccess file to redirect it to my own.
I have looked through numerous threads and have seen a similar but not the same problem. I have added all kinds of info to the top of the .htaccess file...follow symbolic links..etc. etc. and it still doesn't work.
I am thoroughly stumped since this does work on another server. I do not big differences anywhere that could be causing this...except the 404 page which is my only explanation. Please help I'm driving myself nuts lol.
I have a site that works fine using a .htaccess file that changes links so they are search engine friendly(symbolic links).
It looks something like this:
php_flag session.use_trans_sid off
RewriteEngine On
RewriteRule ^info/(.*).html$ page.php?pg=info&cont=$1 [L,NC]
The 'pg' switch is setup like this:
case info:
include("inc/".$cont.".php");
break;
So going to http://www.site.com/index.php?pg=info&cont=file (which would take me to file.php located in the inc folder) it looks pretty like http://www.site.com/info/file.html
This works fine on my current host, I have many redirects setup this way and they work fine.
My problem is that I uploaded the same files to the new host and it does not work - I get a 404 page error.
If I go to http://www.site.com/ewrwrwer (my current host) I get a default IE "page cannot be displayed". If I go to http://www.newsite.com/werwerew (the new host) I get a 404 error.
I think my problem is that somehow the new site is seeing that a file doesn't exist before it hits the htaccess file so it kicks it out to a 404 page. I figured maybe if I changed it so that the symbolic link was going to an actual directory (http://www.site.com/inc/file.html) instead of (http://www.site.com/info/file.html) that it would work. But it still does not, I think this is because it sees file.html as an nonexistant file.
The only difference that I could see from the old server to the new server is that in phpinfo under "server api" the new server has "CGI" whereas the old server has "apache" though they both run apache.
The other odd thing is that if I include this in the .htaccess file "php_flag session.use_trans_sid off" it gives me a error 500 page.
I have talked to the host and there is no way to remove that 404 page, though I can use the .htaccess file to redirect it to my own.
I have looked through numerous threads and have seen a similar but not the same problem. I have added all kinds of info to the top of the .htaccess file...follow symbolic links..etc. etc. and it still doesn't work.
I am thoroughly stumped since this does work on another server. I do not big differences anywhere that could be causing this...except the 404 page which is my only explanation. Please help I'm driving myself nuts lol.