[wp-hackers] rewrite subdomain to page

Computer Guru computerguru at neosmart.net
Sat Nov 24 10:52:29 GMT 2007


This isn't actually a WordPress issue, you know...

This is more about server configuration and belongs in the support forums at
wordpress.org

The limitation you speak of (not being able to accomplish this without
rewriting) isn't one you can work around - it's a restriction on the HTTP
protocol - you can't *invisibly* redirect to content on another domain.


On 11/24/07, Tomas Kapler <tomas at kapler.cz> wrote:
>
> I have made a company web based on the Wordpress, see http://www.sedma.cz/
>
> The problem is, that the client had some subdomains, which had shown a
> subpage of his web - e.g. http://plastova-okna.sedma.cz
>
> He wanted to keep this, but i do not know how to do it. I was only
> able to do rewrite, that forward (301 / 302) such visitior to the new
> address of this page (http://www.sedma.cz/produkty/plastova-okna):
>
> # BEGIN WordPress
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteCond %{HTTP_HOST}  ([^.]+)\.sedma\.cz
> RewriteCond %{HTTP_HOST} !(^www.*)
> RewriteRule ^$  http://www.sedma.cz/produkty/%1  [R,L]
>
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /index.php [L]
> </IfModule>
>
> # END WordPress
>
> But I am unable to do it without rewriting the addres. I know the page
> id, so if you write http://www.sedma.cz/?p=7 , but doing something
> like
>
> RewriteRule ^$  ?p=7  [L]
>
> does not work.
>
> i have been looking for plugins, but all subdiomains plugins does not
> work with latest version of wordpress, and what's worse - they are
> using subdomains for categories, not for pages
>
> Any help would be appreciated
>
> Tomas
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Computer Guru
Director,
NeoSmart Technologies
http://neosmart.net/blog/


More information about the wp-hackers mailing list