Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> mod rewrite i subdomeny
aAndrzej
post
Post #1





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 15.01.2006

Ostrzeżenie: (0%)
-----


Jaka regulke nalezy wstawic w pliku .htaccess aby gdy user otworzy strone z subdomena np.

test.domena.pl

to wszelkie odwolania zostaly przekazane do np. folderu xxx

?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
aAndrzej
post
Post #2





Grupa: Zarejestrowani
Postów: 22
Pomógł: 0
Dołączył: 15.01.2006

Ostrzeżenie: (0%)
-----


hmm, a moze ten bad req powoduje wordpress...

bo gdy dam samo:


RewriteCond %{REQUEST_URI} !subdomains
RewriteCond %{HTTP_HOST} ^(www\.)?nowa.domena.pl$
RewriteRule .* /subdomains/%2%{REQUEST_URI}

to dziala

a gdy polacze to juz z

RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule ^(.*) http://%1/$1 [R,L]
RewriteRule ^(.*)?/?files/(.*) wp-content/blogs.php?file=$2 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

to zwraca bad req dla nowa.domena.pl... ;///
ten kod wordpresa nie powinien byc wykonywany, dla mojej testowej subdomeny a jest ;/
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 8.10.2025 - 14:49