mod_rewrite with Respond CMS - php

So I am trying to try out http://respondcms.com/ and I have got most of it installed and have got to directing my web server to: respondurl/test to test all of my settings.
The only one that is not working correctly is mod_rewrite It gives me no other errors.
I tried following the instructions here: http://respondcms.com/documentation/troubleshooting-installation but I received the following errors:
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
/services/users/zstorage10p4/site_directory_hidden/atomplex/.htaccess:AllowOverride not allowed here
If you think this is a server error, please contact the webmaster.
The instructions tell me to add the following to my .htaccess
Options FollowSymLinks
AllowOverride FileInfo Options all

AllowOverride is not permitted in .htaccess. If those instructions really are what you say they are, they're wrong.
AllowOverride is a directive to be used in the <directory> sections of the main Apache configuration files to indicate which directives are permitted in .htaccess in that directory.
The Apache reference is here

Related

URL rewriting doesn't work when web-site is accessed via alias directory

I have a web-site in the directory d:\www\mysite on my local computer.
Then url http://localhost/mysite/index.php correctly retrieves my file which is located in d:\www\mysite\index.php
My issue is with the URL rewriting in my .htaccess file:
RewriteEngine On
RewriteRule . /front-controller.php [L]
I get this response:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin#dominio.org to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
This is my apache conf
Alias /debian /mnt/www
<Directory /mnt/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

Setting directives in Vagrant (and ProcessWire)

I'm having a problem where it seems like my Vagrant VirtualBox isn't reading the .htaccess file for a site I have mapped out. (a proccesswire site)
I've don't know enough about Vagrant to find where I should be editing the directives so that my .htaccess file will be read. As far as I've gathered from searching I need to set a directive like so:
<Directory /var/www>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
It seems the primary offender is the AllowOverride is typically set to "None" and needs to be "All". But I have put this in a httpd.conf file in apache and I'm guessing that isn't correct.
A bit more information: When I installed PW in the site root I got this error: " Unable to determine if Apache mod_rewrite (required by ProcessWire) is installed. ". As a result when I try to access a part of the CMS, that is usually handled by rewrite rules, the url (/admin or /processwire by default) just reroutes me to the homepage.
Also, I can delete everything in .htacess or add garbage to it and no errors occur. This tells me that .htacess isn't even being read.
I appreciate the help.

error 500 in when installing zend framework

I just installed zend framework on my laptop. When I used wamp server 2.0 to open the index.php file. I received this error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin#localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Can somebody help me to fix that error. Thanks for any help.
Please check the server error log for some clues as to what has happened.
Check if you have loaded the rewrite module in httpd.conf.
LoadModule rewrite_module modules/mod_rewrite.so
Add this section to your httpd.conf
<Directory "{your document root}">
Options FollowSymLinks
AllowOverride All
</Directory>

Returning Http Status Code to Apache from PHP?

On my local development machine, I downloaded PDT + Zend Server, which included Apache 2.2.16 and PHP 5.3.5, running on Windows 7. On my local site, I included a .htaccess that includes ErrorDocuments for 404, 403, and 500. In my PHP, I use header("Http/1.0 404 Not Found") when the user requests a document that doesn't exist. On my local server, everything works great. My custom ErrorDocument appears and I'm happy.
I upload the everything to my shared host running Apache 2.2.38 and PHP 5.3.8 on a Linux server, and suddenly the ErrorDocuments only work if they don't come from PHP.
Is there some setting in PHP.ini or httpd.conf or .htaccess that allows Apace to see the error codes from PHP, which makes my dev server work correctly, but not my shared host?
In researching this, all I ever saw was "Apache doesn't see the status code once it passes off to PHP." In such a case, why does my dev server work right?
Edit
For clarity, here's the .htaccess:
# Use PHP 5.3
Action application/x-hg-php53 /cgi-sys/php53
AddHandler application/x-hg-php53 .php
#Deny Include Files
<Files *.inc>
order deny,allow
deny from all
</files>
#Provide custom error documents
ErrorDocument 404 /Errors/Http404.php
ErrorDocument 403 /Errors/Http403.php
ErrorDocument 500 /Errors/Http500.php
The .htaccess works because if the user navigates to myhost.com/jdkslfjdls the user receives the content of Errors/Http404.php.
However, if the user navigates to myhost.com/images/GetImage.php?Id=5 (when there is no image #5) the user receives no content.
If they navigate to (Internal IP Address)/images/GetImage.php?Id=5, the user receives the content of Errors/Http404.php.
A similar problem occurs if the user tries to access GetImage.php?Id=6 (when there is an image #6 but they don't have permission). On the shared server, they get a blank page or the browser's 403 error. On my dev server, they get my actual custom 403 error page.
Again, 403 error document works on the shared server if I try to access a .inc file.
Are you sure that your .htaccess file is used on the server? Sometimes the hosting company does not allow the global apache settings to be overwritten by the local .htaccess files.
If you however have access to your virtualhost configuration than you may want to look at the following directive
AllowOverride All
If instead you find
AllowOverride None
try to change as above.
Check if you have
AllowOverride ALL
in your apache.conf under the Directory directive inside the VirtualHost corresponding to your website
Anyway, that may be one possible cause, the other may be to check whether or not you have enabled mod_rewrite
On ubuntu or debian based systems, you'd simply link or copy the mod_rewrite.load from /etc/apache2/mods-available/mod_rewrite.load to /etc/apache2/mods-enabled/mod_rewrite.load
Rewrite should have nothing to do though, but I've seen cases where your .htaccess directives may require mod_rewrite
So check for those things in apache conf files.
If nothing happens contact me # phpcip#gmail.com
Hope it works.

Mod redirct error

when I used the SSL fot my website i got following error.
in error log. and site shows me default page instead of actual page.
I got following error.
.htaccess: RewriteEngine not allowed here
Is AllowOverride FileInfo or AllowOverride All on in your server configuration? Typically, HTTPS and HTTP sites use different configuration sections or files. Make sure your site is properly configured.

Categories