mod_rewrite and sub-domains
Posted: Sat Jul 14, 2007 12:44 am
After reading up a little more I think? it's important to also note that login.php is acting as both a FORM input script as well as a login request handler - so I need to propagate POST data?
Here is the situation:
I have these files in DOCROOT:
My .htaccess looks like:
Works awesome but now...
instead of users accessing login.php like:
I would much prefer they use:
Notice how I need login.php to be mapped to a sub-domain (or visa versa) as well as HTTPS protocol to be used.
I don't have SSL enabled yet and I will have to read up a bit more on enabling it, but can someone show me what needs to be added to either .htaccess or apache.conf (actually virtual host setup on debian).
Keeping the three files above all inside the document root as is, is absolutely required/desired - unless I have to move login to an actual directory outside of root I don't want to...
Cheers
Here is the situation:
I have these files in DOCROOT:
Code: Select all
index.php
login.php
admin.phpCode: Select all
RewriteEngine on
RewriteBase /
RewriteRule ^assets/ - [L]
RewriteRule ^admin.php - [L]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]instead of users accessing login.php like:
Code: Select all
www.domain.com/login.phpCode: Select all
https://login.domain.comI don't have SSL enabled yet and I will have to read up a bit more on enabling it, but can someone show me what needs to be added to either .htaccess or apache.conf (actually virtual host setup on debian).
Keeping the three files above all inside the document root as is, is absolutely required/desired - unless I have to move login to an actual directory outside of root I don't want to...
Cheers