SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast dynamohosting's Avatar
    Join Date
    May 2003
    Location
    Michigan
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTaccess/PHP problems

    Hello,

    We are almost ready to roll out our brand new site but just have one problem.

    This is pretty much a problem related to PHP and htaccess.

    Our site users each page as its own folder like instead of shared.php it is /shared and then a plan instead of plan.php is /shared/plan . To do this we use htaccess.

    The problem is that using this code in our htaccess makes it so when you goto a subdomain like forum.site.com it gives a 404 error, but if you type forum.site.com/index.php it works.

    I cant figure out why the htaccess makes it so the subdomains wont work without an extension. Here is the code:

    -----------------------
    RewriteEngine on
    RewriteRule ^$ index.php?main [L]
    RewriteRule ^([0-9a-zA-Z\-\_]+)/?$ index.php?$1 [L]
    RewriteRule ^([0-9a-zA-Z\-\_]+)/([0-9a-zA-Z\-\_]+)/?$ index.php?$1;$2 [L]
    RewriteRule ^([0-9a-zA-Z\-\_]+)/([0-9a-zA-Z\-\_]+)/([0-9a-zA-Z\-\_]+)/?$ index.php?$1;$2;$3 [L]
    -----------------------

    Any ideas on how to fix?

    Thanks,
    Dan
    Dan D.
    Hosting and Internet Services
    Dynamohosting - www.dynamohosting.net

  2. #2
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    Join Date
    Jul 2001
    Location
    Italy
    Posts
    4,514
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •