[wp-hackers] rewrite subdomain to page
Tomas Kapler
tomas at kapler.cz
Sat Nov 24 01:34:51 GMT 2007
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
More information about the wp-hackers
mailing list