[pmwiki-users] Losing the www. in site URL
marc
gmane at auxbuss.com
Sun Dec 3 12:06:34 CST 2006
marc said...
> The root .htaccess is:
>
> RewriteEngine on
> RewriteCond %{HTTP_HOST} ^auxbuss.com$ [NC]
> RewriteRule ^(.*)$ http://www.auxbuss.com/$1 [R=301]
I'm almost there; one of the four cases doesn't work.
Leaving the root .htaccess as above, but adding two line to
pmwiki/.htaccess like this:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^auxbuss.com$ [NC]
RewriteRule ^(.*)$ http://www.auxbuss.com/pmwiki/$1 [R=301]
RewriteBase /pmwiki
# Send requests without parameters to pmwiki.php.
RewriteRule ^$ index.php [L]
# Send requests for index.php to pmwiki.php.
RewriteRule ^index\.php$ pmwiki.php [L]
# Send requests to pmwiki.php, appending the query string part.
RewriteRule ^([^/a-z].*) index.php?n=$1 [QSA,L]
The following URLs work as expected:
http://www.auxbuss.com/pmwiki/
http://www.auxbuss.com/pmwiki
http://auxbuss.com/pmwiki/
But this one fails:
http://auxbuss.com/pmwiki
with
http://www.auxbuss.com/pmwiki//home/domains/auxbuss.com/web/pmwiki
or locally
http://www.blah.com/pmwiki//var/www/pmwiki
I presume that this is due to the /pmwiki in http://auxbuss.com/pmwiki
being treated as a file reference in some way. However, in that case, I
would expect a RewriteRule in the root .htaccess to respond, but nothing
I tried worked.
Anyone able to help, please?
--
Best,
Marc
More information about the pmwiki-users
mailing list