1
Dona_Brasil
Problem with XOOPS & Mod_Rewrite: can't find modules

Xoops is having troubles in finding my modules after I use Mod_Rewrite to rewrite my URL's.

This .htaccess file is working:

Options +FollowSymlinks
RewriteEngine On
RewriteRule 
^hello/world.html$ /test/helloworld.php [QSA,L]


Unfortunately, if I do this to redirect a XOOPS URL:

Options +FollowSymlinks
RewriteEngine On
RewriteRule 
^contact/contact.html$ /modules/contact/index.php?sel_lang=english [QSA,L]


then I get the following message if I go to mydomain/contact/contact.html :

Quote:
Selected module does not exist!


This happens with any module.

Does anybody have a solution?

(I do want to use [QSA,L].)

2
Peekay
Re: Problem with XOOPS & Mod_Rewrite: can't find modules
  • 2006/8/4 16:31

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I believe you need to use a solution like 'Simplified URLs' to use mod_rewrite with Xoops. There's lots of comments about it in this thread and you can download it here.

It looks worthwhile reading the forum posts as there do appear to be a few incompatibilities.
A thread is for life. Not just for Christmas.

3
Dona_Brasil
Re: Problem with XOOPS & Mod_Rewrite: can't find modules

Quote:

Peekay wrote:
I believe you need to use a solution like 'Simplified URLs' to use mod_rewrite with Xoops.


Thanks , I have thought about that. A module like Smartsection can do that trick too. I may use that for less important parts of my website.

However, I want to have more control on at least a number of my URL's. I also have to deal with more than one language. Therefore, I want to make the rewrite rules myselve.

Unfortunately, my rewriting results in a problem with XOOPS which threatens my strategy for world domination

4
przemeks
Re: Problem with XOOPS & Mod_Rewrite: cant find modules
  • 2006/8/27 11:01

  • przemeks

  • Just popping in

  • Posts: 57

  • Since: 2005/1/29


Hello,

I had the same problem on XOOPS 2.0.14.

You must change one line in includes/common.php, from:

$xoopsRequestUri $_SERVER'REQUEST_URI' ]; // Deprecated (use the corrected $_SERVER variable now)


to:

$xoopsRequestUri $_SERVER'SCRIPT_NAME' ];


After this modyfication mod_rewrite on my XOOPS work correctly.

5
vetofish
Re: Problem with XOOPS & Mod_Rewrite: cant find modules
  • 2006/8/27 12:31

  • vetofish

  • Just popping in

  • Posts: 3

  • Since: 2002/7/7 1


I use this, before header include of each page of modules you want to rewrite :

// check modulesless rewrite
if( ! empty( $_SERVER['REQUEST_URI'] ) && ! stristr$_SERVER['REQUEST_URI'] , 'modules' ) ) {
    
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' $_SERVER['QUERY_STRING'] ;
}

include 
'header.php';


This code provide from Gijoe tinyD.

Login

Who's Online

351 user(s) are online (219 user(s) are browsing Support Forums)


Members: 0


Guests: 351


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits