Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Virtual subdomain.. not working well with Textpattern
I’m using cpanel to point movies.saigoheiki.com to www.saigoheiki.com/movies, but the problem is, cpanel demands a folder called ‘movies’ be created instead of recognising the link as a.. well, link.
Any ideas how I can get around to doing this, since this is a unique textpattern URL?
Offline
Re: Virtual subdomain.. not working well with Textpattern
try placing this code in a .htaccess
file in the movies
folder cpanel asks you to create.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*) ../index.php
</IfModule>
This should redirect any requests for /movies to textpattern, even though the directory really exists.
Offline
Re: Virtual subdomain.. not working well with Textpattern
Hmm, but the problem is, when I point it to /movies, that’s because it’s a link and not because there’s a directory or folder there (hence the error I received). I’m using a static article to appear under the Movies section (www.saigoheiki.com/movies), but I can’t make movies.saigoheiki.com point to www.saigoheiki.com/movies without an error about non-existent directory appearing.
I really don’t have a movies folder/dir created at all =P I hope I explained it better now, because I don’t think I did so earlier.
Offline
Re: Virtual subdomain.. not working well with Textpattern
Then you’ll have to create the directory (if cpanel requires this). The .htaccess file is to let textpattern use ‘movies’ as a section even though it exists as a physical directory.
Offline
Re: Virtual subdomain.. not working well with Textpattern
That doesn’t seem to work.. as it merely lists out my physical directory :/
Now that I know the term even better, I’m trying to point the clean URL of www.saigoheiki.com/movies to movies.saigoheiki.com. Any ideas if this can be achieved via cPanel? Or .htaccess?
Last edited by Saigo (2007-01-19 03:41:32)
Offline
Re: Virtual subdomain.. not working well with Textpattern
bump
Offline
#7 2007-01-20 06:58:08
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Virtual subdomain.. not working well with Textpattern
Please clarify what you mean by “link”. Are you meaning like a “symbolic link”? A redirect?
Offline
Re: Virtual subdomain.. not working well with Textpattern
Saigo wrote:
Now that I know the term even better, I’m trying to point the clean URL of www.saigoheiki.com/movies to movies.saigoheiki.com. Any ideas if this can be achieved via cPanel? Or .htaccess?
If what you want is a redirect, then point the subdomain to the main directory and write a 2-line plugin that redirects based on the domain-name.
If you want users to actually “stay” on that url, you’ll need to modify the plugin even further, that it not only redirects, but also modifies generated links. In effect you want a new url-mode, there are a few plugins that implement such things (thogh not specifically what you suggest). Like this one:
http://forum.textpattern.com/viewtopic.php?id=18918
If you cannot develop PHP yourself, maybe you want to ask graeme whether he can quote you a price for developing the desired feature.
Offline
Re: Virtual subdomain.. not working well with Textpattern
Thanks, I think I get roughly what you mean now. I’ll look into the plugins and see what I can do.
Another problem has cropped up though in the process of editing the .htaccess file. Now my clean URLs wouldn’t load at all. :/ I’ll create a new topic since it’s a different problem altogether.. thanks again Sencer!
Offline