Menu

RewriteEngine On problems

TalkBACK
2002-10-30
2002-11-01
  • Nobody/Anonymous

    Is the RewriteRule  \.xpc  index.php  supposed to change the an incoming url  http://domain.tld/man.xpc?user=admin&pw=1234  to http://domain.tld/index.php?user=admin&pw=1234  ?????

    If this is the case on my Linux server using virutal domains I get an error when the RewriteRules are in the .htaccess.  So I moved them to the httpd.conf for the virutal domain.  They still don't work for me.  I get page not found when using anything but the /index.php page.

    Any ideas out there ?

     
    • Nobody/Anonymous

      Hello

      First, make sure your Apache RewriteEngine Module in the httpd.conf file is turned on.

      The .htaccess file rewrite rule and the 404 ErrorHandler simply redirects all requested .xpc and non-existent pages to the index.php file. So non-existent or virtual URIs are all processed via PHPortal.

      This is at the core of what makes PHPortal work. So no you shouldn't call the index.php file directly only via .xpc URIs or non-existent URIs.

      You should be able to get rid of the Rewrite rule and just have the 404 page ErrorHandler to index.php for that directory. So all non-existent URis such as the man.xpc get processed via the PHPortal program.

      You do not need to use the Query string for authentication on a *nix server. Just type domain.com/man.xpc make sure the 404 ErrorHandler is the index.php file and you should be set.

       
    • Michael Glazer

      Michael Glazer - 2002-10-30

      Try Adding a forward slash before the index.php

      FROM THIS:
      RewriteEngine On
      RewriteRule \.xpc index.php
      ErrorDocument 404 /index.php
      DirectoryIndex index.php index.html

      TO THIS:
      RewriteEngine On
      RewriteRule \.xpc /index.php
      ErrorDocument 404 /index.php
      DirectoryIndex index.php index.html

       
    • Nobody/Anonymous

      Found out why it did not work.  The virtual server environment that I am on needed one more line.  Just in case anyone else gets into this trap. .htaccess looks like this.  The Options line is key in my environment Linux/Ensim Virutal Servers

      Options +FollowSymLinks
      RewriteEngine On
      RewriteRule \.xpc /index.php
      ErrorDocument 404 /index.php
      DirectoryIndex index.php index.html

       

Log in to post a comment.

MongoDB Logo MongoDB