Webmaster Forums Banner Professional Hosting from Just Host
Welcome Guest Search | Active Topics | Members | Log In | Register

problem with .htaccess Options
tan
Posted: Wednesday, June 11, 2008 1:50:03 PM
Rank: Advanced Member
Groups: Member

Joined: 1/31/2008
Posts: 63
Points: 189
Location: Pakistan
would like to have the following:

http://london.domain.com/
http://newyork.domain.com/bronkx/
redirecting to
index.php?subdomain=%1&neighborhood=%2

RewriteEngine on
RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com$ [NC]
RewriteCond %{REQUEST_URI} ^/([^/]+)?$ [NC]
RewriteRule ^/(.*)/?$ /index.php?subdomain=%1&neighborhood=%2 [L]

what is wrong here?
Sponsor
Posted: Wednesday, June 11, 2008 1:50:03 PM
kirshana
Posted: Wednesday, June 11, 2008 1:51:03 PM
Rank: Advanced Member
Groups: Member

Joined: 1/31/2008
Posts: 80
Points: 143
Location: India
Try something like this:


Code:

RewriteEngine On RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/?$ /index.php?subdomain=%1&neighborhood=$1 [L]

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

ASPNET Theme created by Boskone (Dan Ferguson)
Powered by HaqTech.Com
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.780 seconds.