Closed Thread
Results 1 to 7 of 7

Thread: Modrewrite questions

  1. #1
    Chairman/CEO TMCG GeorgeB is just really niceGeorgeB is just really niceGeorgeB is just really niceGeorgeB is just really nice
    Join Date
    Jan 2005
    Location
    Virginia
    Posts
    2,608

    Modrewrite questions

    I currently have a mod setup so when someone visits http://chat.domain.com/chat.php it shows http://chat.domain.com instead, but I am noticing it not doing that.

    Does anyone know the proper way to set it up to show just http://chat.domain.com?

    Thanks.

  2. #2
    Jay Street iBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond repute iBrightDev's Avatar
    Join Date
    Oct 2005
    Location
    Not sure, need a GPS.
    Posts
    7,125
    something like this should work...

    Code:
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /subdomain/
    
    RewriteCond %{HTTP_HOST} !www.domain.com$ [NC]
    RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).domain.com [NC]
    RewriteRule (.*)chat.php [NC,QSA]
    but, why are you using a mod-rewrite for this and not just having a subdomain setup? or are you just trying to make chat.php look like it is index.php? if that is the case, just rename chat.php and any code referencing chat.php to be index.php and problem solved.
    Full-service digital agency based in Scottsdale, Arizona - iBright Development

  3. #3
    Chairman/CEO TMCG GeorgeB is just really niceGeorgeB is just really niceGeorgeB is just really niceGeorgeB is just really nice
    Join Date
    Jan 2005
    Location
    Virginia
    Posts
    2,608
    Quote Originally Posted by iBrightDev View Post
    something like this should work...

    Code:
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /subdomain/
    
    RewriteCond %{HTTP_HOST} !www.domain.com$ [NC]
    RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).domain.com [NC]
    RewriteRule (.*)chat.php [NC,QSA]
    but, why are you using a mod-rewrite for this and not just having a subdomain setup? or are you just trying to make chat.php look like it is index.php? if that is the case, just rename chat.php and any code referencing chat.php to be index.php and problem solved.
    I have a subdomain set up chat.domain.com. I have a mod rewrite setup so that chat.domain.com/chat.php shows up as chat.domain.com but in the browser, I notice chat.domain.com/chat.php which is fine I guess, but if possible, rather it just be chat.domain.com

  4. #4
    Chairman/CEO TMCG GeorgeB is just really niceGeorgeB is just really niceGeorgeB is just really niceGeorgeB is just really nice
    Join Date
    Jan 2005
    Location
    Virginia
    Posts
    2,608
    Still shows chat.domain.com/chat.php

  5. #5
    Jay Street iBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond repute iBrightDev's Avatar
    Join Date
    Oct 2005
    Location
    Not sure, need a GPS.
    Posts
    7,125
    hmmm, that was just a quick type out. i will do a mod re-write search and see if i can find something to help you out. mod-rewrite is a pain in the ---. but, still, why are you not just calling it index.php for the chat subdomain?
    Full-service digital agency based in Scottsdale, Arizona - iBright Development

  6. #6
    Chairman/CEO TMCG GeorgeB is just really niceGeorgeB is just really niceGeorgeB is just really niceGeorgeB is just really nice
    Join Date
    Jan 2005
    Location
    Virginia
    Posts
    2,608
    Quote Originally Posted by iBrightDev View Post
    hmmm, that was just a quick type out. i will do a mod re-write search and see if i can find something to help you out. mod-rewrite is a pain in the ---. but, still, why are you not just calling it index.php for the chat subdomain?
    Forgot to mention that I did try changing chat.php to index.php a while back, and it didn't work.

  7. #7
    Jay Street iBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond reputeiBrightDev has a reputation beyond repute iBrightDev's Avatar
    Join Date
    Oct 2005
    Location
    Not sure, need a GPS.
    Posts
    7,125
    well, you cant just change it, im sure the is code that relies on chat.php being named chat.php, so, you would have to mod some code, or, you could create an index.php file and do...

    PHP Code:
    include('chat.php'); 
    that would be the easiest solution im sure.
    Full-service digital agency based in Scottsdale, Arizona - iBright Development

Closed Thread

Similar Threads

  1. VPS Questions
    By Lance-IH in forum Dedicated hosting discussions
    Replies: 6
    Last Post: August 14th, 2006, 00:14
  2. Questions...
    By TJGuitar85 in forum Ad Revenue
    Replies: 2
    Last Post: February 14th, 2002, 22:55
  3. sql questions
    By is0lized in forum Programming Help
    Replies: 5
    Last Post: February 10th, 2002, 19:19
  4. LOADS of questions for own Hosting Biz - startup questions
    By Anayet in forum Paid hosting requests
    Replies: 2
    Last Post: November 2nd, 2001, 11:00
  5. CPM questions...Ad Questions...CPM VS. the rest
    By Makeveli in forum Ad Revenue
    Replies: 2
    Last Post: July 19th, 2001, 11:52

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