Net URL not working, mod_rewrite module installed

I just installed a new copy of Drupal 6.19 to speed up the process of writing modules. But for some reason, the rewrite module does not work for Drupal.

What I checked:

  • $ apachectl -M→ it is installed
  • php_info() on the current server -> says rewrite is also installed
  • I also double checked the file .htaccessin the Drupal root folder
  • UPDATE: checked by httpd.conf for AllowOverride All

I have options here. I looked everywhere, but Drupal settings do not allow me to turn on the settings, and their test just visits the site, which should work if the rewrite module was there.

My specs: Mac OS X 10.6 Snow Leopard Using Embedded Apache with PHP5

Thank!

+3
source share
8 answers

Two more things to check:

  • Make sure yours are .htaccessreadable by your apache processes (yes, I read that you double checked it, but did you include file permissions?)
  • Turn on rewrite logging - this may give you some clues about where it fails. Start at log level 5 and increase / decrease as needed. (Remember to turn it off again later, as this is a huge hog performance;)

In addition, I will try to simplify the test scenario - start with a simple rewrite directive in the vhost configuration. After that, move it to .htaccess at the top level of the root of the vhosts document, then to subdirectories (if necessary / used).

+3

, : .htaccess.

AllowOverride All

Update:

, , Apache .htaccess. , 500 Internal Server Error. , mod_rewrite , Drupal.

+7

, , rewriteBase

# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
RewriteBase /~username/drupal**
+2

Drupal , : example.com/drupal, "RewriteBase/" .htaccess, .

+1

URL- - www.example.com/fisherman, www.example.com/data/pages/fisherman.php

apache URL . 2 .

Enable rewrite module
Allow .htaccess file overrides

SSH root. , , , , . :

,

sudo a2enmod rewrite

sudo service apache2 restart

. , ,

sudo apache2ctl –M

. "rewrite_module".

http://codeontrack.com/enable-clean-urls-apache/

+1

httpd.conf

#LoadModule rewrite_module modules/mod_rewrite.so

, Apache, drupal URL

0

.htaccess . Rackspace/CentOS image

-MultiViews

0

. , , , - .htaccess - ghfdiddfdjf, . , , .htaccess . , :

etc/apache2/sites-enabled default-000. AllowOverride All 2 .

0

Source: https://habr.com/ru/post/1766520/


All Articles