Current location: Hot Scripts Forums » Programming Languages » PHP » .htaccess RewriteCond problem


.htaccess RewriteCond problem

Reply
  #1 (permalink)  
Old 10-25-04, 03:42 AM
ArksI's Avatar
ArksI ArksI is offline
Newbie Coder
 
Join Date: Mar 2004
Location: Bulgaria
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
.htaccess RewriteCond problem

hi guys ! a question:
i need to do the following:
i've a subdomains of the kind:
SOMETHING.domain.com
i need to know what SOMETHING is and use it as a value of a variable
because i need my site to be as much as it can be google friendly i don't need to have things like ?var_name=var_value in the URL.
if anyone can help me, please write !
Reply With Quote
  #2 (permalink)  
Old 10-25-04, 07:23 AM
moronovich moronovich is offline
Junior Code Guru
 
Join Date: Oct 2004
Posts: 460
Thanks: 0
Thanked 0 Times in 0 Posts
hello arksi,
i think to have a read at http://httpd.apache.org/docs/misc/rewriteguide.html is a big move.
after that, i think you'll have insight in how to use apache mod_rewrite for your website.
have a try!!
__________________
just an ignorant noob with moronic solution...
Reply With Quote
  #3 (permalink)  
Old 10-25-04, 07:52 AM
bizzar528's Avatar
bizzar528 bizzar528 is offline
Community Liaison
 
Join Date: Sep 2004
Location: Pennsylvania, US
Posts: 1,550
Thanks: 2
Thanked 16 Times in 15 Posts
I actually use something similiar for a script, however I was able to do it without htaccess files.

Code:
$url = $_SERVER["HTTP_HOST"];
list ($host, $domain, $suffix) = split ("\.", $url, 3);
The only tricky part is if someone uses a www.SOMETHING.yourdomain.com, but I added a if/then to just say if they did that then to use the $domain as the $host.
__________________
Yep, it's a signature...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Count problem kasic ASP.NET 1 10-20-04 12:23 AM
Asp and Microsoft Access 2002 problem gop373 ASP 2 10-06-04 09:13 AM
problem with hotlinking prevention with htaccess Dude21 HTML/XHTML/XML 11 09-04-04 08:58 AM
.htaccess Problem Eric24 PHP 1 09-03-04 09:06 AM
.htaccess problem Eric24 The Lounge 1 09-01-04 06:19 PM


All times are GMT -5. The time now is 04:40 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.