jonw118 Posted March 6, 2008 Share Posted March 6, 2008 So, I'm moving servers from my current VPS to a new one (with Verio). Here's the problem. I have a dynamic php script called content_info.php that pulls the values from the DB and applies it to a template (using Xtemplate) and creates a html page. For this to work, it uses a .htaccess file. When I moved this stuff over to the new server - my .htaccess is not working - thereby rendering the content pages useless. I need some serious help here as it's critical. Here is the .htaccess file: Options +FollowSymLinks RewriteEngine on #RewriteBase / RewriteRule ^content/(.*)/(.*).html content_info.php?id=$1 I'm not a pro at all when it comes to dealing with Apache and .htaccess files. Is there any reason it couldn't move from one server to the next? What could I do to get this work? Any help would GREATLY appreciated. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted March 6, 2008 Share Posted March 6, 2008 some shared web hosts turn off the RewriteEngine on their servers for security reasons. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted March 6, 2008 Share Posted March 6, 2008 To test if your new server is reading your .htaccess file by adding an invalid command into the .htaccess file like so: foobar #invalid command Options +FollowSymLinks RewriteEngine on #RewriteBase / RewriteRule ^content/(.*)/(.*).html content_info.php?id=$1 Now go to your website, and you should get a 500 Internal Server Error message. If you do Apache is reading your .htaccess file and so the problem is your to do with your RewriteRule. Try removing the # from in front of the RewriteBase line If you don't get any error after applying the invalid command then ask your host about using .htaccess file with your hosting account. Your host may not allow the use of .htaccess files. EDIT: If you have access to the servers configuration file (httpd.conf) then set the AllowOverride directive to All . The AllowOverride directive must be set to All (or fileInfo) in order for .htaccess files to read during http requests. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.