Jump to content

Rewrite problem htaccess


nemonline

Recommended Posts

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]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.