Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
Route subdomain to a specific controller using mod_rewrite
Brice
January 2016
Hi,
i saw this discussion
http://fuelphp.com/forums/discussion/10586
I tried to route a subdomain to a specific controller with mod_rewrite inside .htaccess but it doesn't work.
Exemple :
i want to make an invisible redirection of my subdomain :
news.website.com -> www.website.com/news
My .htaccess
------------------------
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} ^news\.website\.com$ [NC]
RewriteRule ^(.*)$ index.php/news [NC,L]
But news.website.com always go to www.website.com
Somebody can help me?
Thanks
Harro
January 2016
You can enable rewrite logging to see exactly what is rewritten, and where your logic fails.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
January 2016