Forum

Rewrite rules

Alex
12 January 2011, 13:12
Hi Hugo,

how look this for Hiawatha, but this must apply for one folder only in my website /var/www/mysite.de/plugins/system/COMP_plugin/

RewriteRule ^(gz|nz)/(.*)\.(js|css)$ jscss.php?f=$2&type=$3&gz=$1


thanks in advance.

Hiawatha version: 7.4
Operating System: Debian 5.0
Hugo Leisink
12 January 2011, 13:41
Assuming that /var/www/mysite.de is your document root, it will be something like:
Match ^/plugins/system/COMP_plugin/(gz|nz)/(.*)\.(js|css)$ Rewrite /plugins/system/COMP_plugin/jscss.php?f=$2&type=$3&gz=$1
Alex
13 January 2011, 12:29
Thanks Hugo, seems to work
Alex
13 January 2011, 19:39
hey Hugo,

what is with a next rules in .htaccess of Joomla?

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/component/) [OR]
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]


How look this one in config of Hiawatha?

Have a look of the full .htaccess:

This is the .htaccess of new Joomla! 1.6 Stable [scrp.at] and this of Joomla! 1.5 [scrp.at]

Thanks in advance.
Hugo Leisink
13 January 2011, 19:52
Have you tried the Joomla UrlToolkit rule from the HOWTO section?
Alex
13 January 2011, 20:17
Yes, already for one year, but I wanted to know whether all rules have been followed in howto.
Hugo Leisink
14 January 2011, 09:54
I've updated the Joomla UrlToolkit rule in the HOWTO section for version 1.6.
Alex
15 January 2011, 16:43
Excellent, thanks for best support!
Alex
16 January 2011, 10:58
Unfortunately, this works but not quite right
Can you please check the rules again?
Hugo Leisink
16 January 2011, 16:09
It would help if you let me know what exactly is not working...
Alex
16 January 2011, 22:57
oh, sorry
default address is http://www.mysite.de/index.php, but from http://www.mysite.de/component/sobipro/?task=entry.add&sid=1&Itemid=0
by click on submit button it is incorrectly redirect to
http://www.mysite.de/component/sobipro/index.php
there is no directory /component/ and /sobipro/ it is generated only as, which should actually be the http://www.mysite.de/component/sobipro/?task=entry.add&sid=1&Itemid=0 again.
Hugo Leisink
17 January 2011, 09:58
Weird. When I test the latest UrlToolkit rule for Hiawatha via wigwam, it shows that /component/sobipro/?task=entry.add&sid=1&Itemid=0 is also being redirected to /index.php, which should be done according to the rewrite rules for Apache which you pointed me to.

What if you leave out the component line?
Alex
17 January 2011, 11:01
you mean this line? "Match ^/component/ Skip 2"
if so, then come an error 404
Hugo Leisink
17 January 2011, 11:50
I'm a little bit confused. The URL http://www.mysite.de/component/sobipro/?task=entry.add&sid=1&Itemid=0 should be rewritten to what?
Alex
18 January 2011, 16:51
It is a pity that the access to the web page is limited to the IP addresses of the employees. Only the project manager can change this. But he knows nothing about my Hiawatha test
If you want, I can send the link to the component of Joomla with it you can test it yourself.
Hugo Leisink
18 January 2011, 18:28
A link won't help me if I don't know what the result URL should be. For URL rewriting I need to know two things: the original URL and the result URL.
This topic has been closed.