I have recently found out, that if I go to www.mydomain.com/template-alias, Umbraco will be awesome and load the entered template alias rather then the one you set in the backend. Now, this seems like great functionality for a mobile version of the website, so I have been playing around with it.
The thing is, I need to rewrite the url. I kinda want all: mobile.mydomain.com requests to go to mydomain.com/mobile or mobile.mydomain.com/page1 -> mydomain.com/page1/mobile.
No matter what I try though, it's not accepting the rewrite. I tried both ISAPI and the .netRewriting in Umbraco, but neither is working. Server is windows 2003 and we are using Umbraco 4.5.2
So I was hoping someone could help with this. Thanks in advance!
With not working, I meant no matter what I did (even rewrite code that 100% worked on another site) just wouldn't be fired. But we seem to have found the problem already. My collegue has reinstalled the ISAPI rewrite engine and everything seems to be working fine now.
If it's gonna act up again, I'll post my config, but for now it seems to be unrelated.
Switching between templates at runtime
Hey all, new question from me :D
I have recently found out, that if I go to www.mydomain.com/template-alias, Umbraco will be awesome and load the entered template alias rather then the one you set in the backend. Now, this seems like great functionality for a mobile version of the website, so I have been playing around with it.
The thing is, I need to rewrite the url. I kinda want all: mobile.mydomain.com requests to go to mydomain.com/mobile or mobile.mydomain.com/page1 -> mydomain.com/page1/mobile.
No matter what I try though, it's not accepting the rewrite. I tried both ISAPI and the .netRewriting in Umbraco, but neither is working. Server is windows 2003 and we are using Umbraco 4.5.2
So I was hoping someone could help with this. Thanks in advance!
-Ferdy
Hi Ferdy
You can redirect your page to mobile.mydomain.com by checking useragent. Here is sample code
Hope this make sense
Pnima
Pasang, I thank you for your time, but that is not what I asked. I need help with url rewriting, not a simple redirect script.
Regards,
-Ferdy
Hi Ferdy - can you expand upon "not working" perhaps posting your config -
Another approach would to be to hook into the BeforeRequestInit event:
e.g.
Hi Darren,
With not working, I meant no matter what I did (even rewrite code that 100% worked on another site) just wouldn't be fired. But we seem to have found the problem already. My collegue has reinstalled the ISAPI rewrite engine and everything seems to be working fine now.
If it's gonna act up again, I'll post my config, but for now it seems to be unrelated.
-Ferdy
is working on a reply...