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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
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. > |
|
|||
|
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. |