Htacess - multiple URLs redirection to single URL

0 votes
151 views
added Nov 13, 2023 in Server issues by lcjr First Warrant Officer (11,790 points)

Instead of like this;

Redirect /Wakanda /outer/universe/wakanda
Redirect /wakanda1 /outer/universe/wakanda

 

Use this

RedirectMatch 301 ^/(Wakanda|wakanda1) /outer/universe/wakanda

 

1 Response

0 votes
responded Nov 14, 2023 by lcjr First Warrant Officer (11,790 points)

# Asia
RedirectMatch ^/(south-korea|china|japan)$ /asia/east-asia/$1
RedirectMatch ^/(malaysia|indonesia|thailand|singapore|cambodia|vietnam|laos|myanmar)$ /asia/sea/$1
RedirectMatch ^/(malaysia|Malaysia|indonesia|thailand|singapore|cambodia|vietnam|laos|myanmar)$ /asia/sea/$1
RedirectMatch ^/(bangladesh|india|pakistan)$ /asia/south-asia/$1
RedirectMatch ^/(tajikistan|kyrgyzstan|uzbekistan|kazakhstan)$ /asia/central-asia/$1

# Oceania
RedirectMatch ^/(australia|new-zealand)$ /oceania/$1

# North America
RedirectMatch ^/(canada|usa)$ /north-america/$1

# South America
RedirectMatch ^/(colombia|brazil|mexico|peru)$ /south-america/$1

# Middle East
RedirectMatch ^/(lebanon|jordan|saudi-arabia|iran|uae)$ /middle-east/$1

# Africa
RedirectMatch ^/(egypt|morocco|south-africa)$ /africa/$1

# Europe
RedirectMatch ^/(uk|scotland|wales|germany|turkey|russia|bulgaria|north-macedonia|serbia|kosovo|montenegro|bosnia-and-herzegovina|hungary|austria|czech-republic|poland|italy|france|spain|portugal|netherlands|iceland|sweden)$ /europe/$1

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...