htaccess & subdomains |
[eluser]Unknown[/eluser]
I am having issues - we have two domains working off the same codeignitor installation. I'm doing to use "domain" instead of our real domain bc we aren't live yet. www.domain.com points to the root directory. members.domain.com points to a subfolder called /members/ We have an htaccess file in the root with this Code: RewriteEngine on The www site works fine on every page. The members.domain.com only works on the initial page. Any sub pages (like http://members.domain.com/plan/view/5) do not work, I get a "Not Found" error. Any ideas?
[eluser]rogierb[/eluser]
You need a second .htaccess in the member folder with a RewriteBase /members/
[eluser]Unknown[/eluser]
Thanks for the quick response! I had already tried doing that like this: Code: RewriteEngine on Because of your post, I researched RewriteBase a bit harder and discovered what I was doing wrong. The RewriteBase removes the physical directory, so it works like this: Code: RewriteEngine on Thank you so much!
[eluser]Steiner[/eluser]
I managed to get my server to utilize domains as an user relatable sub-query. Code: #Options are Optional Sadly if you goto http://domain.com it will redirect to http://www.domain.com; I can't find away around it without compromising the user sub-query. But it should help some readers. This will allow normal use of the www.domain.com/segment/segments applications while http://testuser.domain.com/segment will literally seek out the path equivilent of http://domain.com/index.php/users/username/<username> or whatever you have setup in your configuration. This also requires that you setup routing: Code: $route['user/(:any)'] = 'user/username/$1'; |
Welcome Guest, Not a member yet? Register Sign In |