mod_rewrite problems as always :)
I have some rewriterules in my httpd.conf file, strange thing is that they cause external redirects (302 found). I would much rather have the alias stay in the url bar..sub.example.com redirects to http://www.example.com/front/index.p...ome&view=index
Whereas it should normally only redirect if I have R=301 or something added to the rewriterule as well...
Here's an excerpt from my httpd.conf:
Thanks
Code:
NameVirtualHost 209.xx.xx.xx:80 BytesLog domlogs/host.example.com-bytes_log ServerName host.example.com DocumentRoot /usr/local/apache/htdocs RewriteEngine on Options +FollowSymlinks RewriteCond %{HTTP_HOST} ^[^.]+\.example\.com$ RewriteCond %{HTTP_HOST} !^www\.example\.com$ RewriteCond %{HTTP_HOST} !^host\.example\.com$ RewriteRule ^(.+) %{HTTP_HOST}$1 [C] RewriteRule ^([^.]+)\.example\.com/?$ http://www.example.com/front/index.php?subdomain=$1&module=welcome&view=index [L] RewriteRule ^([^.]+)\.example\.com/history.html$ http://www.example.com/front/index.php?subdomain=$1&module=general&from=history&view=index [L] RewriteRule ^([^.]+)\.example\.com/family.html$ http://www.example.com/front/index.php?subdomain=$1&module=general&from=family&view=index [L] RewriteRule ^([^.]+)\.example\.com/thenandnow.html$ http://www.example.com/front/index.php?subdomain=$1&module=thenandnow&view=index [L] RewriteRule ^([^.]+)\.example\.com/index.php?([^.]+)$ http://www.example.com/front/index.php?subdomain=$1 [QSA] [L]