.htaccess question

by 6 replies
7
I developed an html mobile site for a client who's main site is php. The problem is when I try to access m.clientssite (the subdomain I created) I get a page not found. I called Hostgator and they said I need to turn off the rewrite engine in htaccess to be able to view it. I did and then I could view it.... however, the main site links did not work... I got page not found. So, I turned rewrite back on so the main site worked, but now, no mobile! I called Hostgator again and got a different tech who said there was no way around the problem... that it was a catch 22.

So, before I give up, I thought I'd take advantage of you genius people here to see if I can maybe add something in the htaccess file that will fix it. Here is what is currently in the file..



RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.html$ $1.php [L]

AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes



My client uses this php site as the master site to over 50 others that are affiliates so he can update them all at once. Thanks for any help!
#programming #htaccess #question
  • do you have a separate htaccess in the subdomain directory?
  • Hi Friend you use that code details as under....

    <?
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: http://www.new-url.com" );
    ?>
    • [1] reply
    • Thanks for the replies! I wound up making subdomains on the corporate site of my client, which is html.
  • Can anyone share the htaccess code to include (www) in my domain name without adding slash(/) at the end of the url.
  • What do you want to do? Add "www" or not have the trailing slash?
    The trailing slash is required and will be added automatically, if it was left off.

Next Topics on Trending Feed

  • 7

    I developed an html mobile site for a client who's main site is php. The problem is when I try to access m.clientssite (the subdomain I created) I get a page not found. I called Hostgator and they said I need to turn off the rewrite engine in htaccess to be able to view it. I did and then I could view it.... however, the main site links did not work... I got page not found. So, I turned rewrite back on so the main site worked, but now, no mobile! I called Hostgator again and got a different tech who said there was no way around the problem... that it was a catch 22. So, before I give up, I thought I'd take advantage of you genius people here to see if I can maybe add something in the htaccess file that will fix it. Here is what is currently in the file..