Mobile app version of vmapp.org
Login or Join
Kristi941

: You are looking for something pretty similar to me. This code worked (it redirects the user to a new link) but it needs some polish Options +FollowSymlinks -MultiViews <IfModule mod_rewrite.c>

@Kristi941

You are looking for something pretty similar to me.

This code worked (it redirects the user to a new link) but it needs some polish

Options +FollowSymlinks -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(.*).example.com
RewriteRule ^(.*)$ /%1-index.php [L,NC]
</IfModule>


So this should redirect someone entering to "baseball.example.com" to example.com/baseball-index.php

Best regards

PS: Credits to Dave Lozier (Redirect subdomain to folder without changing the URL)

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Kristi941

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme