This is a discussion on Apache mod_rewrite rules issue? within the Apache Web Server forums, part of the Web Server and Related Forums category; This is the contents of .htaccess: RewriteEngine On RewriteRule ^/admin/?$ /fof/admin.php [L] RewriteRule ^/admin/logout/?$ /fof/admin.php?...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
This is the contents of .htaccess:
RewriteEngine On RewriteRule ^/admin/?$ /fof/admin.php [L] RewriteRule ^/admin/logout/?$ /fof/admin.php?f=logout [L] The contents of admin.php can be found here: http://svn.thegot.org/forbes_office_furniture/admin.php The web accessible URL is: http://dev.thegot.org/fof/admin -- 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. Hopefully, I'm making a very simple mistake, but any help here would be appreciated. Thank you. |
|
|||
|
"Hector" <hectcastro@gmail.com> schreef in bericht
news: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 |
|
|||
|
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] |
|
|||
|
"Hector" <hectcastro@gmail.com> schreef in bericht
news:4ee88310-2eb7-47c3-9bc7-f0dac90188f6@z72g2000hsb.googlegroups.com... >>> 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. > > 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". IOW no changes: admin is in virtual use by another application > Also, I do not believe /admin is in use by my provider because > this is on my own machine. Thus you're your own hosting provider ... ask yourself ;-) You're on Ubuntu 5.10, right? Check your Apache's config files for reference to /admin: grep -Ri admin /etc/apache2/* > RewriteEngine On > RewriteBase / For the records: - only required if .htaccess and result of rewrite are in dfferent file trees - .htaccess in document root is a performance penalty: it is evaluated -and eating CPU time- for any request; /admin/.htaccess is about only evaluated when needed > RewriteRule ^admin/?$ /fof/admin.php [L] > RewriteRule ^admin/logout/?$ /fof/admin.php?f=logout [L] HansH |