Re: Re: help with rewrites - changing the base path [RESOLVED]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> RewriteRule /(.*)$  http://www.foo.com/$1 [R=301]
Andre, you've hit it on the nose here.
Thank you and the List.

On Mon, Dec 29, 2008 at 2:53 PM, André Warnier <aw@xxxxxxxxxx> wrote:
> Hi.
>
> Am I interpreting this correctly, that the .htaccess file you are talking
> about, is the one that is in the original /techblog location ?
>
> If so, and without taking my word for it, isn't it so for a RewriteRule that
> is in a .htaccess file in such a location "/techblog", that the original URL
> you are comparing against already has the "/techblog" prefix removed ?
>  (because you are "already there" so to speak)
>
> Maybe you want to try this instead :
>
> RewriteRule /(.*)$  http://www.foo.com/$1 [R=301]
>
>
>
>
>
> Matthew Sacks wrote:
>>
>> I cleared all rewrites so all I have is the following:
>> RewriteRule ^/techblog(.*)$  http://www.foo.com/$1 [R=301]
>>
>> I want http://www.bar.com/techblog/thisfile.html to be redirected to
>> http://www.foo.com/thisfile.html
>>
>> I cant seem to get this to work. all I get is  404
>>
>> On Mon, Dec 15, 2008 at 2:54 PM, Matthew Sacks <ntwrkd@xxxxxxxxx> wrote:
>>>
>>> i am trying to change the base path of a directory to rewrite to a new
>>> location, there are no files in the location, so it is just a
>>> cosmetic/seo change.
>>>
>>> i have some rewrites that are put in place by my hosting provider, and
>>> im having some difficulty getting the rewrite to work:
>>>
>>>
>>> here is my .htaccess file:
>>>
>>> # BEGIN WordPress
>>> <IfModule mod_rewrite.c>
>>> RewriteEngine On
>>>
>>> RewriteBase /techblog/
>>> RewriteCond %{REQUEST_FILENAME} !-f
>>> RewriteCond %{REQUEST_FILENAME} !-d
>>> #RewriteRule   ^/techblog  /technology-blog [L]
>>> RewriteRule . /techblog/index.php [L]
>>>
>>>
>>> </IfModule>
>>>
>>> # END WordPress
>>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux