I’m trying to write a mod_rewrite to work like this
wildcard.subdomain.domain.com=>subdomain.domain.com/data.php?q=wildcardwildcard.subdomain.domain.com/?repeat=1=>subdomain.domain.com/data.php?q=wildcard&repeat=1subdomain.domain.com=>data.phpwww.subdomain.domain.com=>data.php
What I’ve done so far in my .htaccess
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]+)\.abc\.def\.com\.br$ [NC]
RewriteCond %1 !^(www)$ [NC]
RewriteRule ^.*$ data.php?q=%1
</IfModule>`
Try these:
Note that this does nothing in the cases where the request is:
wildcard.subdomain.domain.com/some/path/to/file.htmlThese only match request URI’s that are/.