1
disky
Make mod_rewrite easier
  • 2005/11/26 13:10

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


When playing around with mod_rewrite to make URL's better for search engines, i had to do the following change:

In includes/common.php

Change:
$xoopsRequestUri = $_SERVER[ 'REQUEST_URI' ];
to:
$xoopsRequestUri = $_SERVER[ 'SCRIPT_NAME' ];

Then it is possible to use mod_rewrite to change URL's from

http://www.domain.com/modules/fsArticle/index.php?id=171

to maybe:

http://www.domain.com/article/171


Could this please be included in the core ?
The commont on that line actually says:
// Deprecated (use the corrected $_SERVER variable now)

I have had a site running with this for 6 month without any problems at all.

Best regards
Søren Reinke