Mod redirct error - php

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.

Related

Magento index.php required with SSL for login and checkout pages [HTTP 404]

I am using magento 1.9, I've got installed SSL which is working just fine.
The problem is when I am switching my secure link to https:// - all pages are working correctly, but pages such as checkout, register and login are throwing error 404, unless I manually add prefix with index.php
These links are working correctly when I am working with non-secure connections.
For example this links are working correctly:
http://myshop.com/customer/account/login/
http://myshop.com/customer/account/create/
But my links
https://myshop.com/customer/account/login/
https://myshop.com/customer/account/create/
are throwing HTTP 404 - Not Found - In order to make it work I have to manually add index.php prefix so my links look like this:
http://myshop.com/index.php/customer/account/login/
http://myshop.com/index.php/customer/account/create/
I have changed my .htaccess file, and I think the problem lies in this file. How can I edit this file so it fits my purposes ?
Any other solutions are more then welcome also.
The SSL has its own configuration files and sometimes when SSL does not work well, it may give the error of 404 (Page not found). Normally, the file name is http.conf or ssl.conf or default-ssl file which depends on your OS
Find here:
<Directory "path to your directory">
SSLOptions +StdEnvVars
AllowOverride All
</Directory>
make sure that AllowOverride All is present in your config
if it does not help attach what OS and web server you are using
Double check if you have enabled Web Server Rewrites
config > general > web > Search Engine Optimization > Use Web Server Rewrites > Yes
P.S restore the .htaccess file before try above method
Checked some of your website current pages such as https://www.myshop.com/registreren and it is working fine with https.

Wordpress and Xampp not open child pages

I'm working with wordpress + xampp but I can not see the child pages.
Appears:
Object not found!
The requested URL was not found on this server. The link on that page seems to be in an error or out of date. Please inform the author of that page about the error.
If you think this is a server problem, please contact the webmaster.
error 404
localhost
Apache / 2.4.12 (Win32) OpenSSL / 1.0.1l PHP / 5.6.8
By default, Xampp has FollowSymlinks disabled. See point 4 on how to
enable mod rewrite (if not done already)
set AllowOverride from none to all
https://codex.wordpress.org/Using_Permalinks#Fixing_Permalink_Problems
If AllowOverride is not set to all, permalinks will cause exactly these 404 errors you describe ("Not found" on existing pages).
For others that might come across this issue but already have mod_rewrite enabled as I did, try creating .htaccess and making it writable.

mod_rewrite with Respond CMS

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

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.

PHP rewrite giving 404, .htaccess problem?

I have the following .htaccess:
#Options +FollowSymLinks
RewriteEngine on
RewriteBase /phptest
on my local testing server (http://localhost) I have to uncomment the first line for the site to work. Otherwise I get Error 403 (Forbidden).
Once I upload the page to my webserver (FastHosts) I get Error 500 (Internal Server Error) if the first line is not commented out.
If I comment it out, my page loads but it cannot find the page content which is mydomain.com/phptest/Home
I get a 404.
Any suggestions on what the problem might be?
Check for mod_negotiation to be disabled. It gives unexpected results in combination with mod_rewrite.
I think you need to modify your httpd.conf to allow for AllowOverride All
What does your error log say?
Can you please check whether mod_rewrite is enable or not in your php.ini file. If not then please enable that.

Categories