Welcome Guest, Not a member yet? Register   Sign In
Redirect "/" to "/home"?
#14

[eluser]dmorin[/eluser]
Using mod_redirect seems like the dirty solution to me, not the cleaner one. It sounds like you're making something that should be fairly portable since you're not sure if it will be in a sub directory or not. .htaccess files are significantly less portable than just having a controller method responsible for the redirect.

If I were you, I would set my default controller as one similar to the one posted above, except instead of checking for anything, just always redirect to 'home'. Then it doesn't matter if it's in a subdirectory or hosted on a windows box under IIS, it'll still redirect correctly as long as your config is correct.

Although, this brings up another point that I didn't see clarified. If it is in a subdirectory and someone browses to the root of the site, should it redirect to home in the subdirectory?


Messages In This Thread
Redirect "/" to "/home"? - by El Forum - 01-08-2009, 09:18 PM
Redirect "/" to "/home"? - by El Forum - 01-09-2009, 05:50 AM
Redirect "/" to "/home"? - by El Forum - 01-10-2009, 02:46 PM
Redirect "/" to "/home"? - by El Forum - 01-10-2009, 03:46 PM
Redirect "/" to "/home"? - by El Forum - 01-10-2009, 04:41 PM
Redirect "/" to "/home"? - by El Forum - 01-10-2009, 05:10 PM
Redirect "/" to "/home"? - by El Forum - 01-10-2009, 11:03 PM
Redirect "/" to "/home"? - by El Forum - 01-11-2009, 12:36 AM
Redirect "/" to "/home"? - by El Forum - 01-11-2009, 12:39 AM
Redirect "/" to "/home"? - by El Forum - 01-11-2009, 02:18 AM
Redirect "/" to "/home"? - by El Forum - 01-11-2009, 08:25 AM
Redirect "/" to "/home"? - by El Forum - 01-11-2009, 08:52 AM
Redirect "/" to "/home"? - by El Forum - 01-11-2009, 10:34 PM
Redirect "/" to "/home"? - by El Forum - 01-12-2009, 08:43 AM
Redirect "/" to "/home"? - by El Forum - 01-12-2009, 12:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB