Answered
CF and .htaccess Help!!!
I need help in creating a dynamic .htaccess file... I
currently have the following set up and it works great...
RewriteEngine on
RewriteRule ^([^/]*)\.html$ http://www.mysite.com/mydir/thepage.cfm?pagename_id=$1
So if you were to go to www.mysite.com/mydir/hello-world.html it will work perfectly
-------------------------------------------
Here is the situation though....
1. I need to create a dynamic .htaccess file because multiple sites are going to be sharing the same "webfiles" on the server.
For instance:
mysite.com will access files "a"
yoursite.com will access files "a" also.
So the issue here is that if my .htaccess file has http://www.mysite.com hardcoded into the file, then if yoursite.com tries to access the "a" files, then it will automatically redirect to mysite.com
How do I create a .htaccess file that will interpret what the web site is and automatically change the .htaccess...
For instance:
mysite.com .htaccess will be
RewriteEngine on
RewriteRule ^([^/]*)\.html$ http://www.mysite.com/mydir/thepage.cfm?pagename_id=$1
and yoursite.com .htaccess will be
RewriteEngine on
RewriteRule ^([^/]*)\.html$ http://www.yoursitecom/mydir/thepage.cfm?pagename_id=$1
Is there anyway to make this part (the ???????) dynamic: http://www.?????????.com/mydir/thepage.cfm?pagename_id=$1
Anyones help on this would be greatly appreciated!!!!!!
RewriteEngine on
RewriteRule ^([^/]*)\.html$ http://www.mysite.com/mydir/thepage.cfm?pagename_id=$1
So if you were to go to www.mysite.com/mydir/hello-world.html it will work perfectly
-------------------------------------------
Here is the situation though....
1. I need to create a dynamic .htaccess file because multiple sites are going to be sharing the same "webfiles" on the server.
For instance:
mysite.com will access files "a"
yoursite.com will access files "a" also.
So the issue here is that if my .htaccess file has http://www.mysite.com hardcoded into the file, then if yoursite.com tries to access the "a" files, then it will automatically redirect to mysite.com
How do I create a .htaccess file that will interpret what the web site is and automatically change the .htaccess...
For instance:
mysite.com .htaccess will be
RewriteEngine on
RewriteRule ^([^/]*)\.html$ http://www.mysite.com/mydir/thepage.cfm?pagename_id=$1
and yoursite.com .htaccess will be
RewriteEngine on
RewriteRule ^([^/]*)\.html$ http://www.yoursitecom/mydir/thepage.cfm?pagename_id=$1
Is there anyway to make this part (the ???????) dynamic: http://www.?????????.com/mydir/thepage.cfm?pagename_id=$1
Anyones help on this would be greatly appreciated!!!!!!
