I have the following setup:
On my virtual host I did setup the following rewrite rule:
Code: Select all
# Rewrite <subdomain>.mydomain.com/<path> to mydomain.com/<subdomain>/<path>
#
# Skip rewrite if no hostname or if subdomain is www
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\. [NC]
# Extract (required) subdomain (%1), and first path element (%3), discard port number if present (%2)
RewriteCond %{HTTP_HOST}<>%{REQUEST_URI} ^([^.]+)\.mydomain\.com(:80)?<>/([^/]*) [NC]
# Rewrite only when subdomain not equal to first path element (prevents mod_rewrite recursion)
RewriteCond %1<>%3 !^(.*)<>\1$ [NC]
# Rewrite to /subdomain/path
RewriteRule ^(.*) /%1/$1 [L]http://myblog.mydomain.com/ instead of http://www.mydomain.com/myblog.
This is very convenient for me as I just can create a new folder and I can access it directly as a subdomain.
then the s9y .htaccess should do something with the url but there something goes wrong.
If I take css as example: in the source code of the index.php page that I see the css is requested is the correct url I would expect...
http://myblog.mydomain.com/serendipity.css
... this url is re-written by my own rules first ...
http://mydomain.com/myblog/serendipity.css
...and s9y should translate this on its turn into...
http://mydomain.com/myblog/index.php?ur ... dipity.css
Now my question is what did I not see and you do (hopefully)?
database settings:
Code: Select all
356182;"dbNames";"false";"0"
356183;"serendipityPath";"/var/www/www.mydomain.com/myblog/";"0"
356184;"uploadPath";"uploads/";"0"
356185;"serendipityHTTPPath";"/";"0" /* tried with /myblog/ too*/
356186;"templatePath";"templates/";"0"
356187;"uploadHTTPPath";"uploads/";"0"
356188;"baseURL";"http://myblog.mydomain.com/";"0"
356189;"autodetect_baseURL";"false";"0" /* tried true too*/
356190;"indexFile";"index.php";"0"