Current location: Hot Scripts Forums » Other Discussions » Web Servers » .htaccess problem with new host


.htaccess problem with new host

Reply
  #1 (permalink)  
Old 02-07-06, 04:56 PM
SugarChick SugarChick is offline
New Member
 
Join Date: Feb 2006
Location: PA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
.htaccess problem with new host

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:
Code:
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:

Code:
			
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess and PHP Redirect problem dodod PHP 3 06-19-05 11:56 PM
html/php form for .htaccess validation Boat_2005 PHP 1 03-29-05 04:29 PM
.htaccess RewriteCond problem ArksI PHP 2 10-25-04 08:52 AM
.htaccess Problem Eric24 PHP 1 09-03-04 10:06 AM
.htaccess problem Eric24 The Lounge 1 09-01-04 07:19 PM


All times are GMT -5. The time now is 07:38 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.