Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [htaccess]Proste przekierowanie
Forum PHP.pl > Forum > Serwery WWW > Apache
ps123
Witam,
mam coś takiego:

http: //ps123.pl/pl/
http: //ps123.pl/en/
http: //ps123.pl/inwestor_pl/
http: //ps123.pl/investor_en/

chcę przekierować:

http://ps123.pl/inwestor_pl/ na http://inwestor.ps123.pl/
http: //ps123.pl/investor_en/ na http: //investor.ps123.pl/

Odnośniki http://ps123.pl/pl/ oraz http://ps123.pl/en/ mają pozostać bez zmian.

Jako że strona stoi na wordpresie multidomain w starej wersji, strona ma dobry page rank to boję sieze zrobie jakieś szopki i będzie źle.

Proszę o pomoc w stworzeniu odpowiedniego pliku htaccess

Obecny htaccess:

Kod
RewriteEngine On
RewriteBase /

# wersja pl na en
#RewriteRule ^pl http://ps123.pl/en [R=301,L]

# Linki na starej stronie
RewriteRule ^en/academy http://ps123.pl/en/careers/cv [R=301,L]
RewriteRule ^academy http://ps123.pl/en/careers/cv [R=301,L]
RewriteRule get-quote.html$ http://ps123.pl/en/company/contact-us [R=301,L]

# uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,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]

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
kw95s
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.http://inwestor.ps123.pl/$ [NC]
RewriteRule ^(.*)$ http://http://inwestor.ps123.pl//$1 [R=301,L]

#Przekierowanie 301 dla domeny stara -> nowa
RewriteEngine On
RewriteRule ^(.*)$ http://inwestor.ps123.pl//$1 [R=301,L]
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.