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 ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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 ?
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.
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
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