RewriteRule and RewriteCond - Shared host

This is a discussion on RewriteRule and RewriteCond - Shared host within the Apache Web Server forums, part of the Web Server and Related Forums category; I'm on a shared host where the internal addresses are all: http://xxx.xxx.xxx.xxx/~user/pagename.htm ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-01-2006
anon
 
Posts: n/a
Default RewriteRule and RewriteCond - Shared host

I'm on a shared host where the internal addresses are all:

http://xxx.xxx.xxx.xxx/~user/pagename.htm

At some point, I will enable DNS so that my access is:

http://www.mydomain.com/pagename.htm

But for now, in order to do testing, I need to do so through the IP
address.

I was thinking the following would work, but it doesn't:

RewriteCond %{REQUEST_URL} !^/~user/.*
RewriteCond %{REQUEST_URL} ^/xxx.xxx.xxx.xxx/.*
RewriteRule ^/xxx.xxx.xxx.xxx/(.*)$ ^/xxx.xxx.xxx.xxx/~user/$1

I was thinking that the above would just gracefully be ignored once I
enabled DNS.

Does anybody see what I'm doing wrong?

Thanks
  #2 (permalink)  
Old 07-04-2006
anon
 
Posts: n/a
Default Re: RewriteRule and RewriteCond - Shared host

On Sat, 01 Jul 2006 22:12:31 GMT, anon@anon.invalid.net (anon) wrote:

>I'm on a shared host where the internal addresses are all:
>
>http://xxx.xxx.xxx.xxx/~user/pagename.htm
>
>At some point, I will enable DNS so that my access is:
>
>http://www.mydomain.com/pagename.htm
>
>But for now, in order to do testing, I need to do so through the IP
>address.
>
>I was thinking the following would work, but it doesn't:
>
> RewriteCond %{REQUEST_URL} !^/~user/.*
> RewriteCond %{REQUEST_URL} ^/xxx.xxx.xxx.xxx/.*
> RewriteRule ^/xxx.xxx.xxx.xxx/(.*)$ ^/xxx.xxx.xxx.xxx/~user/$1
>
>I was thinking that the above would just gracefully be ignored once I
>enabled DNS.
>
>Does anybody see what I'm doing wrong?


Anybody?

  #3 (permalink)  
Old 07-10-2006
anon
 
Posts: n/a
Default Re: RewriteRule and RewriteCond - Shared host

Anybody?

On Sat, 01 Jul 2006 22:12:31 GMT, anon@anon.invalid.net (anon) wrote:

>I'm on a shared host where the internal addresses are all:
>
>http://xxx.xxx.xxx.xxx/~user/pagename.htm
>
>At some point, I will enable DNS so that my access is:
>
>http://www.mydomain.com/pagename.htm
>
>But for now, in order to do testing, I need to do so through the IP
>address.
>
>I was thinking the following would work, but it doesn't:
>
> RewriteCond %{REQUEST_URL} !^/~user/.*
> RewriteCond %{REQUEST_URL} ^/xxx.xxx.xxx.xxx/.*
> RewriteRule ^/xxx.xxx.xxx.xxx/(.*)$ ^/xxx.xxx.xxx.xxx/~user/$1
>
>I was thinking that the above would just gracefully be ignored once I
>enabled DNS.
>
>Does anybody see what I'm doing wrong?
>
>Thanks


  #4 (permalink)  
Old 07-11-2006
anon
 
Posts: n/a
Default Re: RewriteRule and RewriteCond - Shared host

Pretty please?

On Mon, 10 Jul 2006 03:11:08 GMT, anon@anon.invalid.net (anon) wrote:

>Anybody?
>
>On Sat, 01 Jul 2006 22:12:31 GMT, anon@anon.invalid.net (anon) wrote:
>
>>I'm on a shared host where the internal addresses are all:
>>
>>http://xxx.xxx.xxx.xxx/~user/pagename.htm
>>
>>At some point, I will enable DNS so that my access is:
>>
>>http://www.mydomain.com/pagename.htm
>>
>>But for now, in order to do testing, I need to do so through the IP
>>address.
>>
>>I was thinking the following would work, but it doesn't:
>>
>> RewriteCond %{REQUEST_URL} !^/~user/.*
>> RewriteCond %{REQUEST_URL} ^/xxx.xxx.xxx.xxx/.*
>> RewriteRule ^/xxx.xxx.xxx.xxx/(.*)$ ^/xxx.xxx.xxx.xxx/~user/$1
>>
>>I was thinking that the above would just gracefully be ignored once I
>>enabled DNS.
>>
>>Does anybody see what I'm doing wrong?
>>
>>Thanks

>


  #5 (permalink)  
Old 07-11-2006
Jim Hayter
 
Posts: n/a
Default Re: RewriteRule and RewriteCond - Shared host

anon wrote:
>> On Sat, 01 Jul 2006 22:12:31 GMT, anon@anon.invalid.net (anon) wrote:
>>
>>> I'm on a shared host where the internal addresses are all:
>>>
>>> http://xxx.xxx.xxx.xxx/~user/pagename.htm
>>>
>>> At some point, I will enable DNS so that my access is:
>>>
>>> http://www.mydomain.com/pagename.htm
>>>
>>> But for now, in order to do testing, I need to do so through the IP
>>> address.
>>>
>>> I was thinking the following would work, but it doesn't:
>>>
>>> RewriteCond %{REQUEST_URL} !^/~user/.*
>>> RewriteCond %{REQUEST_URL} ^/xxx.xxx.xxx.xxx/.*
>>> RewriteRule ^/xxx.xxx.xxx.xxx/(.*)$ ^/xxx.xxx.xxx.xxx/~user/$1
>>>
>>> I was thinking that the above would just gracefully be ignored once I
>>> enabled DNS.
>>>
>>> Does anybody see what I'm doing wrong?
>>>
>>> Thanks

>


Are you sure that REQUEST_URL is what you should be using? I don't find
that particular variable in my references.

Jim
  #6 (permalink)  
Old 07-13-2006
anon
 
Posts: n/a
Default Re: RewriteRule and RewriteCond - Shared host

On Tue, 11 Jul 2006 12:15:15 -0400, Jim Hayter
<see.reply.to@nowhere.invalid> wrote:

>anon wrote:
>>> On Sat, 01 Jul 2006 22:12:31 GMT, anon@anon.invalid.net (anon) wrote:
>>>
>>>> I'm on a shared host where the internal addresses are all:
>>>>
>>>> http://xxx.xxx.xxx.xxx/~user/pagename.htm
>>>>
>>>> At some point, I will enable DNS so that my access is:
>>>>
>>>> http://www.mydomain.com/pagename.htm
>>>>
>>>> But for now, in order to do testing, I need to do so through the IP
>>>> address.
>>>>
>>>> I was thinking the following would work, but it doesn't:
>>>>
>>>> RewriteCond %{REQUEST_URL} !^/~user/.*
>>>> RewriteCond %{REQUEST_URL} ^/xxx.xxx.xxx.xxx/.*
>>>> RewriteRule ^/xxx.xxx.xxx.xxx/(.*)$ ^/xxx.xxx.xxx.xxx/~user/$1
>>>>
>>>> I was thinking that the above would just gracefully be ignored once I
>>>> enabled DNS.
>>>>
>>>> Does anybody see what I'm doing wrong?
>>>>
>>>> Thanks

>>

>
>Are you sure that REQUEST_URL is what you should be using? I don't find
>that particular variable in my references.


Well, here is a link to a random post that seems to indicate it is
valid:

http://mail-archives.apache.org/mod_...onder.co.uk%3E

Thanks for the response.

  #7 (permalink)  
Old 07-14-2006
Rik
 
Posts: n/a
Default Re: RewriteRule and RewriteCond - Shared host

anon wrote:
> On Tue, 11 Jul 2006 12:15:15 -0400, Jim Hayter
> <see.reply.to@nowhere.invalid> wrote:
>
>> anon wrote:
>>>> On Sat, 01 Jul 2006 22:12:31 GMT, anon@anon.invalid.net (anon)
>>>> wrote:
>>>>
>>>>> I'm on a shared host where the internal addresses are all:
>>>>>
>>>>> http://xxx.xxx.xxx.xxx/~user/pagename.htm
>>>>>
>>>>> At some point, I will enable DNS so that my access is:
>>>>>
>>>>> http://www.mydomain.com/pagename.htm
>>>>>
>>>>> But for now, in order to do testing, I need to do so through the
>>>>> IP
>>>>> address.
>>>>>
>>>>> I was thinking the following would work, but it doesn't:
>>>>>
>>>>> RewriteCond %{REQUEST_URL} !^/~user/.*
>>>>> RewriteCond %{REQUEST_URL} ^/xxx.xxx.xxx.xxx/.*
>>>>> RewriteRule ^/xxx.xxx.xxx.xxx/(.*)$ ^/xxx.xxx.xxx.xxx/~user/$1
>>>>>
>>>>> I was thinking that the above would just gracefully be ignored
>>>>> once I
>>>>> enabled DNS.
>>>>>
>>>>> Does anybody see what I'm doing wrong?
>>>>>
>>>>> Thanks
>>>

>>
>> Are you sure that REQUEST_URL is what you should be using? I don't
>> find
>> that particular variable in my references.

>
> Well, here is a link to a random post that seems to indicate it is
> valid:
>
>

http://mail-archives.apache.org/mod_...onder.co.uk%3E

Hmmz, sure it shouldn't be REQUEST_URI?

From: http://httpd.apache.org/docs/2.0/mod...ml#rewritecond

REQUEST_URI
The resource requested in the HTTP request line.

Grtz,
--
Rik Wasmus


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:58 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0