View Single Post

  #3 (permalink)  
Old 06-17-2008
Hector
 
Posts: n/a
Default Re: Apache mod_rewrite rules issue?

On Jun 17, 3:38*pm, "HansH" <ha...@invalid.invalid> wrote:
> "Hector" <hectcas...@gmail.com> schreef in berichtnews:40e606ed-651b-4458-ab9f-ae573b130c4d@e39g2000hsf.googlegroups.com...
>
> > This is the contents of .htaccess:
> > RewriteEngine On
> > RewriteRule ^/admin/?$ /fof/admin.php [L]
> > RewriteRule ^/admin/logout/?$ /fof/admin.php?f=logout [L]

>
> In .htaccess the pattern should not start with /
> If this .htacces is in the folder /admin drop it from the pattern and
> add the line
> * * RewriteBase /
>
> > --

>
> Due to the -- some news readers have stopped here.
>
> > The second rewrite rule does not seem to be functioning properly.
> > Maybe there is something wrong syntactically, but I have yet to find
> > it. *The strange part is that if I alter the second rewrite rule (^/
> > admin to ^/adm) to:

>
> > RewriteRule ^/adm/logout/?$ /fof/admin.php?f=logout [L]

>
> > Or anything under 5 characters, everything works.

>
> Looks like /admin is in use by your hosting provider.
>
> HansH


There is no "admin" directory. admin.php is located in the web site's
root directory. Adjusting the .htaccess to what you see below still
does not work for first RewriteRule parameter "admin" but works for
"adm". Also, I do not believe /admin is in use by my provider because
this is on my own machine.

RewriteEngine On
RewriteBase /

RewriteRule ^admin/?$ /fof/admin.php [L]
RewriteRule ^admin/logout/?$ /fof/admin.php?f=logout [L]