Ticket #1610 (new defect)

Opened 3 months ago

Last modified 1 month ago

symlinked public web assets conflict with mod_rewrite rules if frontControllerScript is suppressed

Reported by: demian Assigned to: somebody
Priority: normal Milestone: 0.9.0 - polishing
Component: not categorised Severity: open
Keywords: Cc:

Description (Last modified by jcasanova)

eg and image requested like this


is symlinked to


however if following request is made


mod_rewrite conflict occurs as the current rewrite conditions checks if REQUEST_FILENAME is a file or a folder and one cannot load foo module.

Change History

04/07/08 08:47:30 changed by ed209

there was start of a discussion on a solution here http://groups.google.com/group/seagull_general/browse_thread/thread/271d5aa8e23b87b4/7e35be4f0c0509ed?lnk=gst&

04/07/08 12:36:58 changed by jcasanova

  • description changed.

04/07/08 12:46:58 changed by jcasanova

  • description changed.

I can see and tested 2 possible solutions, which should work fine for windows users (that was the pb mentioned in above discussion).

1. have the symlink (or copy for Win users) prepended by an "_", e.g.

/path/to/sgl/www/_foo > /path/to/sgl/modules/foo/www

and modify appropriate calls in code to reflect this path.

2. add a placeholder file called e.g. norewrite.txt in each module's web assets folder and modify add a RewriteCond to check if this file exists

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_FILENAME}norewrite\.txt -f
RewriteRule ^(.*) index.php [L]

This second solution works pretty fine as well, and I would recommend it for existing projects (thus you don't have to upgrade to next SGL version).

I would implement first solution in sgl 0.6.5.

04/10/08 08:51:27 changed by lakiboy

Juju, isn't it easier to place .htaccess file to /path/to/sgl/www/module with following content:

RewriteEngine off

05/22/08 06:07:27 changed by demian

  • milestone changed from 0.6.5 to 0.9.0 - polishing.

fixed in 0.6.5 [3805]

see TroubleShooting/RemovingIndex.php

moving too 0.9.x

05/22/08 06:13:33 changed by jcasanova

Dima, not it won't work as it will prevent mod_rewrite to work when trying to load your foo module.