![]() |
|
|
|
|
Junior Talker
Posts: 4
|
Apache on Windows 2003 SP2.
Lets say I have a site that is accessible by these URL's: http://somelocalsvr/directory http://192.168.1.1/directory I want to redirect all requests that come via 192.168.1.1 to a subdirectory, ie. http://192.168.1.1/directory > http://192.168.1.1/directory/subdirectory So I have this rule: Code:
RewriteCond %{HTTP_HOST} ^192.168.1.1
RewriteCond %{REQUEST_URI} !^/directory/subdirectory(.*)$
RewriteRule ^/directory(.*)$ /directory/subdirectory$1 [R]
Is there any way I can achieve this? Thanks in advance for any help... |
|
|
|
| Sponsored Links (We share ad revenue): |
|
|
Re: RewriteRule help |
|
Super Moderator
![]() Posts: 10,642
Location: Blackpool. UK
|
unless yours is the first or only site on the IP. HTTP requests for the IP won't even get as far as .htaccess.
__________________
Chris. ->> Links are advertising NOT optimising!! <<- Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System |
|
|
|
|
|
Re: RewriteRule help |
|
Ultra Talker
Latest Blog Post:
Confessions and Reflections of a [Former] ... Posts: 433
Name: Tamar Weinberg
Location: New York
|
I think he's talking about an intranet setup -- like for users in his office. So I'm not sure if that makes a difference.
__________________
Techipedia: All About Social Media |
|
|
|
| Sponsored Links (We share ad revenue): |
| Thread Tools | |
|
|
| Webmaster Resources Marketplace: |
| Software Development Company | Webhosting.UK.com |
| Web Templates | Text Link Brokers | Stock Photos |