1

I am currently assisting a client with a Drupal 6 to 8 upgrade. After migrating a copy of the site into a development localhost environment. I noticed that I was not able to enable clean URLs. I have checked the .htaccess and found the following:

RewriteEngine on
RewriteBase /clientname
RewriteBase /
#Redirect /clientname

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

I have have checked other forums, and according to them the issue should be fixed. However, I am dealing with this same issue.

Any new advice would be much appreciated.

2
  • 1
    Why do you have RewriteBase twice? You should decide to only one. Can you just use .htaccess provided with D8? Can you make sure your mod_rewrite is enabled on your local? – kenorb Jul 7 '16 at 23:20
  • Is "AllowOverride All" set in you Apache file? – Parag Jul 8 '16 at 0:03
0

Did you read this:

  # 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 /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

Actually, you should use the original D8 .htaccess cause there are some special rewrites for core and autoloader (and more).

2
  • Within my original question, I was referring to the .htaccess file of the Drupal 6 site that was migrated to my localhost server. I apologize for any confusion on my part. How can I enable Clean URLs for a drupal 6 site after it has been migrated? – Jermaine Johnson Jul 10 '16 at 16:52
  • I don't understand your problem. If you are on a D6 site, just enable the "path" module and make sure, that you have mod_rewrite installed. – Rainer Feike Jul 10 '16 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.