nemonline Posted July 25, 2012 Share Posted July 25, 2012 Hi there, The following code works just fine on a production server, but when i try it on a test server with same configuration, it fails. Prod server: PHP Version 5.3.2-1ubuntu4.5 Test server: PHP Version 5.3.2-1ubuntu4.17 Core directives are identical on both servers, since i copied the php.ini file from the Prod. server. <? if (!isset($_GET['id'])){$id = '0';}else{$id = $_GET['id'];} echo"$id <br><br><br>"; if($id=='' or $id=='0'){echo"This is a test page with A SINGLE VAR for htaccess<br><br><a href=\"/test/2.html\">Click for 2 VAR page</a>";}else{echo"$id | This is a test page with 2 VARs for htaccess";} ?> The Prod server gives me 2.html the message "This is a test page with 2 VARs for htaccess" when i click the link. The Test server gives me 2.html with the "This is a test page with A SINGLE VAR for htaccess" message when i click the link. What should i look for? The apache2/error.log is clean. Here is .htaccess: Options +FollowSymLinks RewriteEngine On php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on php_value docref_root 0 php_value docref_ext 0 RewriteRule ^(test)/([^/]*)\.html$ /index.php?link=test [L] RewriteRule ^(test)\.html$ /index.php?link=test [L] Quote Link to comment https://forums.phpfreaks.com/topic/266209-rewrite-problem-htaccess/ 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.