question about page_add bug solving with mod_rewrite enabled
donP |
|
---|---|
# Koradhil :Your syntax doesn't take me to list.php?c=$1 but to homepage...RewriteCond %{HTTP_HOST} ^([A-Za-z0-9\-]+).sangelo.net$ [NC] RewriteRule ^([a-z\-]+)$ list.php?c=$1 [NE,NC,L,QSA]I'm pretty good with mod_rewrite, but it always requires testing and tweaking. the right syntax was mine: RewriteCond %{HTTP_HOST} !www.sangelo.net$ [NC] RewriteCond %{HTTP_HOST} ^([A-Za-z0-9\-]+).sangelo.net$ [NC] RewriteRule (.*) list.php?c=%1 [NE,NC,L,QSA] But my problem was not to first level, that I personally already solved like that... The problem is for second and third level, rewriting http://cat1.sangelo.net/subcat/ redirecting to list.php?c=subcat and http://cat.sangelo.net/subcat/subsubcat redirecting to list.php?c=subsubcat 'cause a rule like the one below: RewriteCond %{HTTP_HOST} ^([A-Za-z0-9\-]+).sangelo.net/([A-Za-z0-9\-]+)$ [NC] RewriteRule (.*) list.php?c=%2 [NE,NC,L,QSA]still redirects to list.php?c=cat Personally I think it's a problem concerned with subdomain form in url, cause, also when rewriting http://cat.sangelo.net (that right takes me to list.php?c=cat) I have problems in displaying images, cause .tpl files address images to /skin/skinname/img/imagefile.jpg, not to the complete domain url including http://www.sangelo.net... so, also that is a real problem (I would have to correct all tpl files, hoping that we haven't too many hardcoded images that I would have to correct with core hacks)... in [color=#729FCF][b]BLUES[/b][/color] I trust
|