• It has come to my attention that ever since upgrading to 1.5 (and above) my subdomains are malfunctioning. Rather than bringing you to subdomain.purple-lilacs.com – they go to purple-lilacs.com/subdomain. I contacted my host and they basically helped me confirm that it’s due to the rewrite rules for the permalinks. Now I wouldn’t really care, but I just bought an add-on domain and I’m rather concerned it’s going to not work properly because of this issue.

    I have had subdomains and addon domains with WP in the root of my main site using permalinks in the past and never had this issue before. And I don’t want to sacrifice all of my links and such just for my new domain, nor do I want to get rid of it. But this is a weird problem and I thought perhaps I could get a solution to it as my host seems rather much stumped.

    Thanks

Viewing 14 replies - 1 through 14 (of 14 total)
  • close up the slash.

    so:

    http://subdomain.purple-lilacs.com/

    or even

    http://subdomain.purple-lilacs.com/page.php/

    but you’re right

    subdomain.purple-lilacs.com

    redirects to

    purple-lilacs.com/subdomain

    not a thrilling fix, but it’s a workaround for now.

    Thread Starter Cyndy Otty

    (@ceo)

    That doesn’t stop the redirection….it still does it. It absolutely is annoying me to no end.

    Thread Starter Cyndy Otty

    (@ceo)

    I just got this email from my host:

    If you want to leave the htaccess file there you will have to negate any lines in the parent file that you do not want to run in the child htaccess file.

    So you will have to change anything that you didnt want changed back. As in you will have to do another rewrite that will reverse what was done by the parent htaccess file.

    So, basically, I just need to put a reverse htaccess in the subdomains…okie-dokey.

    Hi,

    I seem to have the same problem. Can someone explain to me, what the content of such a .htaccess file needs to be and where I should place it?

    For a while things worked allright, then I engaged Permalinks, which I dropped later again. Now the / in the Options after the blog address won’t save.

    Thread Starter Cyndy Otty

    (@ceo)

    The slash isn’t supposed to be in the options….WP’ll screw up if it’s there.

    But as for the subdomain thing, no idea. I’m going to be rearranging my site soon and putting my other domain as the main account so that I can use it since without the ability to use subdomains properly I can’t use it as an addon right now.

    I’ve said it before and I’ll say it again, this is not a good thing that the htaccess does this when using permalinks, if it were it weren’t just a minor annoyance I’d be up in arms for a solution, of which I assume there is…or should be though no one is willing to spell it out for me.

    I’m in the process of setting up a blog. I had intended to use a subdomain such as blog.domain.com but I also likely the idea of cleaner more human readable permalinks. I’m not expert in .htaccess but from the little dicking I have done I get Internal Error 500 with the error log saying stuff like:

    [Tue Aug 23 15:04:00 2005] [error] [client 154.5.73.79] File does not exist: /home/muskie/domains/muschamp.ca/public_html/blog/2005/08/23/test/
    [Tue Aug 23 15:04:00 2005] [error] [client 154.5.73.79] File does not exist: /home/muskie/domains/muschamp.ca/public_html/blog/404.shtml
    [Tue Aug 23 15:05:13 2005] [alert] [client 154.5.73.79] /home/muskie/domains/muschamp.ca/public_html/blog/.htaccess: <IfModule takes one argument, Container for directives based on existance of specified modules

    I guess I can always go with the uglier permalinks, it is not like I have any in use, but I like the cleanliness of the URL and the directory structure of using the subdomain…

    Muskie

    Thread Starter Cyndy Otty

    (@ceo)

    First, referring to MY original issue that this thread began with…I just did a fresh install of WP on my new domain, enabled permalinks and they work fine and ARE NOT interfering with my subdomains. So hurray for that!

    Anyway, muskie, Did you make sure your htaccess is writable? Did you try the optionfollowsymlinks addition into htaccess? I clicked over to your blog and your permalinks aren’t enabled so I’m not sure what to tell you.

    I did chmod to use the unix term my .htaccess file. I tried it both with and without the option followsymlinks addition. I’ll try 777 on the file.

    The reason symlinks is off is so I could test some other things and slowly build the template I need to integrate it with the rest of my site. On my live server there is no .htaccess file in the blog directory (read subdomain) and I am using the default permalinks because in this configuration it works. IE the I can see my template changes in the browser.

    One thing that drove me batty yesterday was some sort of rogue invisible character in my style.css I cut and pasted from a tutorial and no matter how many times I zapped gremlins or converted to ascii it would give WordPress fits. Eventually I had to copy over the default themes style.css and hack on it. I swear I have BBEdit set to create UNIX text files, does WordPress expect DOS, surely not?

    I’ll do some more testing later today, right now I’m at work.

    Muskie

    I did chmod to use the unix term my .htaccess file. I tried it both with and without the option followsymlinks addition. I’ll try 777 on the file.

    The reason symlinks is off is so I could test some other things and slowly build the template I need to integrate it with the rest of my site. On my live server there is no .htaccess file in the blog directory (read subdomain) and I am using the default permalinks because in this configuration it works. IE the I can see my template changes in the browser.

    One thing that drove me batty yesterday was some sort of rogue invisible character in my style.css I cut and pasted from a tutorial and no matter how many times I zapped gremlins or converted to ascii it would give WordPress fits. Eventually I had to copy over the default themes style.css and hack on it. I swear I have BBEdit set to create UNIX text files, does WordPress expect DOS, surely not?

    I’ll do some more testing later today, right now I’m at work.

    Muskie

    There is a lenghty discussion regarding Mac line endings screwing up stylesheets. See the bug report here:
    http://trac.wordpress.org/ticket/1020

    You see I wan’t born yesterday, I knew what the problem was I just couldn’t fix it for a while. I finally found the setting in BBEdit and I changed it to Unix line breaks. I think because it was .css file and not a .html I haven’t created a brand new .css file in years I just edit the existing ones on my site. 😉

    Thanks for the link, I’ll check it out. It is good to know I wasn’t going insane last night. I swear I fixed the problem as soon as I started drinking my beer…

    OK so internet was down at home for the evening so I didn’t get to try it until today.

    First thing I did was get rid of the /wordpress/ directory. Now my blog is at blog.muschamp.ca and my wordpress installation is there too.

    Then I did some stuff, but I made progress when I created an empty .htaccess file and let WordPress write to it via changing the permisions to the mark of the beast. That got me some errors which I’d paste below but they are gone. I can reporduce them however.

    When I look at what WordPress was doing different I noticed my .htaccess file was now one long line. So I added in the line to turn the following of symlinks on and got the Internal 500 error. I then got the last ten lines from my error logs:

    [Thu Aug 25 11:10:19 2005] [alert] [client 154.5.73.79] /home/muskie/domains/muschamp.ca/public_html/blog/.htaccess: <IfModule takes one argument, Container for directives based on existance of specified modules
    [Thu Aug 25 11:10:19 2005] [alert] [client 154.5.73.79] /home/muskie/domains/muschamp.ca/public_html/blog/.htaccess: <IfModule takes one argument, Container for directives based on existance of specified modules
    [Thu Aug 25 11:10:19 2005] [alert] [client 154.5.73.79] /home/muskie/domains/muschamp.ca/public_html/blog/.htaccess: <IfModule takes one argument, Container for directives based on existance of specified modules
    [Thu Aug 25 11:10:19 2005] [alert] [client 154.5.73.79] /home/muskie/domains/muschamp.ca/public_html/blog/.htaccess: <IfModule takes one argument, Container for directives based on existance of specified modules
    [Thu Aug 25 11:13:00 2005] [error] [client 154.5.73.79] File does not exist: /home/muskie/domains/muschamp.ca/public_html/blog/favicon.ico
    [Thu Aug 25 11:13:00 2005] [error] [client 154.5.73.79] File does not exist: /home/muskie/domains/muschamp.ca/public_html/blog/404.shtml
    [Thu Aug 25 11:16:53 2005] [alert] [client 154.5.73.79] /home/muskie/domains/muschamp.ca/public_html/blog/.htaccess: Illegal option RewriteEngine
    [Thu Aug 25 11:16:53 2005] [alert] [client 154.5.73.79] /home/muskie/domains/muschamp.ca/public_html/blog/.htaccess: Illegal option RewriteEngine
    [Thu Aug 25 11:16:53 2005] [alert] [client 154.5.73.79] /home/muskie/domains/muschamp.ca/public_html/blog/.htaccess: Illegal option RewriteEngine
    [Thu Aug 25 11:16:53 2005] [alert] [client 154.5.73.79] /home/muskie/domains/muschamp.ca/public_html/blog/.htaccess: Illegal option RewriteEngine

    Now I’ll remove Options +FollowSymlinks upload and get the other errors again:

    Or I would if I could… I’ll leave it busted this time rather than return it to non-pretty permilinks.

    Muskie

    I finally got internet access at home and the time to take a look at this. Here are the error messsages I received without the follow symlink option added to the WordPress generated .htaccess file.

    Warning: main(): Unable to access ./wordpress/wp-blog-header.php in /home/muskie/domains/muschamp.ca/public_html/blog/index.php on line 4

    Warning: main(./wordpress/wp-blog-header.php): failed to open stream: No such file or directory in /home/muskie/domains/muschamp.ca/public_html/blog/index.php on line 4

    Warning: main(): Unable to access ./wordpress/wp-blog-header.php in /home/muskie/domains/muschamp.ca/public_html/blog/index.php on line 4

    Warning: main(./wordpress/wp-blog-header.php): failed to open stream: No such file or directory in /home/muskie/domains/muschamp.ca/public_html/blog/index.php on line 4

    Fatal error: main(): Failed opening required ‘./wordpress/wp-blog-header.php’ (include_path=’.:/usr/local/lib/php’) in /home/muskie/domains/muschamp.ca/public_html/blog/index.php on line 4

    These errors appear to be because I removed the wordpress directory to simplify my domain structure and help my subdomain work better. Is it possible I can have either a nice domain structure and a working subdomain or nice permalinks?

    It took some trial and error but I got it working like I want.

    Blog at http://blog.muschamp.ca/

    And a sample permalink cleaned up

    http://blog.muschamp.ca/2005/08/23/test/

    The key seem to be getting everything just so.

    1) Set up the subdomain first and make sure you update index.php not just copy it.
    2) Put an empty .htaccess file there chmod to 666
    3) Change your permalink structure and have WordPress generate the .htaccess code into your empty file.
    4) Test and enjoy…

    Muskie

    Now to fix my template how I want and set up some categories etc. etc.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Permalinks and Subdomains’ is closed to new replies.