Forum Moderators: phranque
I've searched and searched and couldn't find the solution.
IT's about the trailing slash or rather when there isn't a trailing slash address in the URL field changes from the addon domain to a subdomain on the main domain. E.g.
www.addondomain.com/appdir
gets redirected to
addondomain.maindomain.com/appdir/admin/index.php
instead of
www.addondomain.com/appdir/admin/index.php
When www.addondomain.com/appdir/ is entered (with trailing slash) it does redirect correct to www.addondomain.com/appdir/admin/index.php
I've tried
RewriteRule ^/(([^/]+/)*([^/.]+))$ /$1/ [R=301] Hope you can help me fix this.
Thanks,
Erwin
[edited by: jdMorgan at 3:41 pm (utc) on Mar. 16, 2007]
[edit reason] De-linked currently-active domain. [/edit]
The simplest solution should be tried first: Correct your RewriteRule syntax to:
RewriteRule ^/(([^/]+/)*([^/.]+))$ [b]http:[/b]/[b]/www.addondomain.com[/b]/$1/ [R=301,L]
I'm also assuming that this code is to be used in httpd.conf or conf.d, because of the leading slash on your RewriteRule pattern. If that is not the case, and this code is in .htaccess, then remove that leading slash.
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim