Quick links: Content - sections - sub sections
Quick Search Advanced search

  [Opened] Removing module name in the URL

Hi, there, I am working on cleaning the URLs. I have removed "index.php" in the URL, now the URLs look like


aaa is a module. Since aaa is the only module in my jelix app, is it possible to make the URLs look like


Thanks, Richard

  [Opened] Removing module name in the URL


Did you use the rewrite rules in apache ?

If so, you certainly configured something like that, as indicated into the manual:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L,QSA]

If so, just add aaa in the RewriteRule:

    RewriteRule ^(.*)$ index.php/aaa/$1 [L,QSA]

  [Opened] Removing module name in the URL

Thank you! It works. However, I just found another problem. This is because I also use jauth in my application, so when login as a user, jAuth::isConnected() always return false or $user = jAuth::getUserSession() doesn't work at all.

I suppose jAuth is a module, but my rewrite rules break it.Is there any method to add an exception? I tried to add

RewriteCond %{REQUEST_URI} !^jauth$

in the condition part, but it didn't work.

  [Opened] Removing module name in the URL

I'm not an expert in rewrite rules. Try to ask in an other forum.

Or you can use the significant url engine. So you can define the url you want for each action. However you have to define urls for all actions. For jauth modules and other jelix modules, you can include their urls.xml.

  1. Removing module name in the URL