NameSilo

.mobi .xhtml or .html - Htaccess file?

Spaceship Spaceship
Watch

pchip

Established Member
Impact
434
I have a free hosting account with godaddy and I uploaded my test website to it - index.xhtml. It didn't resolve. It seems that I must modify the htaccess file in my root account. I didn't see this file when I logged into my ftp account so i'm assuming that I need to create one. I think I found what I need but wanted to check with you guys to see if this is normal - does it matter who does the hosting or is this pretty typical.

I found this courtesy of member akc - under the 'WAP 2.0 Development. Tutorial for NamePros.com' sticky thread...

AddType application/xhtml+xml .xhtml
DirectoryIndex index.html index.xhtml index.php
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yoursite\.mobi [nc]
RewriteRule (.*) http://www.yoursite.mobi/$1 [R=301,L]
RewriteCond %{HTTP_USER_AGENT} .*MSIE.*
RewriteCond %{REQUEST_URI} \.xhtml$
RewriteRule .* - [T=text/html]

Thanks!

pc

update: I uploaded my new .htaccess and it worked!

Now, i'm still curious what everyone else has done to solve this issue. Anybody care sharing their .htaccess file?

Thanks!

pc
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
You can either modify your .htaccess file (like you did) or just change the name of index.xhtml to index.html
I have use both methods, without any problems noted.
goodluck!
 
0
•••
Thanks for the response TexasGamer! Seems silly then to name it xhtml and modify the htaccess file if you can name it html and it works just the same.
 
0
•••

We're social

  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back