Mod_rewrite question

This is a discussion on Mod_rewrite question within the Apache Web Server forums, part of the Web Server and Related Forums category; how do I use ModRrewrite to get all pages in a certain directory to open a certain way? In other ...


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 12-05-2003
NotGiven
 
Posts: n/a
Default Mod_rewrite question

how do I use ModRrewrite to get all pages in a certain directory to open a
certain way?

In other words, for every page in the directory: mydomain.com/frg/

I want to gorce it to https://,ydomain.com/frg/

How do I write that ModRewrite directive?

Thanks.


  #2 (permalink)  
Old 12-05-2003
Justin Koivisto
 
Posts: n/a
Default Re: Mod_rewrite question

NotGiven wrote:

> how do I use ModRrewrite to get all pages in a certain directory to open a
> certain way?
>
> In other words, for every page in the directory: mydomain.com/frg/
>
> I want to gorce it to https://,ydomain.com/frg/
>
> How do I write that ModRewrite directive?
>
> Thanks.
>
>


Why use mod_rewrite when you can do something like the following:

Redirect /frg/ https://mydomain.com/frg/

--
Justin Koivisto - spam@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

  #3 (permalink)  
Old 12-05-2003
NotGiven
 
Posts: n/a
Default Re: Mod_rewrite question

I tried that and restarting apache threw an error so I replaced it with the
backup and it 3worked again.

Dunno why that happened.



"Justin Koivisto" <spam@koivi.com> wrote in message
news:JH2Ab.1487$Uz.48664@news7.onvoy.net...
> NotGiven wrote:
>
> > how do I use ModRrewrite to get all pages in a certain directory to open

a
> > certain way?
> >
> > In other words, for every page in the directory: mydomain.com/frg/
> >
> > I want to gorce it to https://,ydomain.com/frg/
> >
> > How do I write that ModRewrite directive?
> >
> > Thanks.
> >
> >

>
> Why use mod_rewrite when you can do something like the following:
>
> Redirect /frg/ https://mydomain.com/frg/
>
> --
> Justin Koivisto - spam@koivi.com
> PHP POSTERS: Please use comp.lang.php for PHP related questions,
> alt.php* groups are not recommended.
>



  #4 (permalink)  
Old 12-05-2003
Justin Koivisto
 
Posts: n/a
Default Re: Mod_rewrite question

NotGiven wrote:

> "Justin Koivisto" <spam@koivi.com> wrote in message
> news:JH2Ab.1487$Uz.48664@news7.onvoy.net...
>
>>NotGiven wrote:
>>
>>
>>>how do I use ModRrewrite to get all pages in a certain directory to open

>
> a
>
>>>certain way?
>>>
>>>In other words, for every page in the directory: mydomain.com/frg/
>>>
>>>I want to gorce it to https://,ydomain.com/frg/
>>>
>>>How do I write that ModRewrite directive?
>>>
>>>Thanks.
>>>
>>>

>>
>>Why use mod_rewrite when you can do something like the following:
>>
>>Redirect /frg/ https://mydomain.com/frg/
>>

> I tried that and restarting apache threw an error so I replaced it with the
> backup and it 3worked again.
>
> Dunno why that happened.


Sorry, been a while since I used it, try this:

Redirect /frg https://mydomain.com/frg

That should work if mod_alias is working.

Else, if you really want to use mod_rewrite:

RewriteRule ^frg/(.*) https://mydomain.com/frg/$1 [L,NS,QSA]

--
Justin Koivisto - spam@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.

 
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 06:08 AM.


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