Forum

magento 2 rewrite rules for new user?

Phicheth K.
30 March 2016, 07:17
Arch Linux
hiawatha 10.1
PHP 7.0.4 + PHP-FPM
Magento 2.0

I am new for hiawatha, try to install magento 2 with rewrite rules have been found in this community. but seen it doesn't work for me,

UrlToolkit {
ToolkitID = magento
Match ^/api/rest Rewrite /api.php?type=rest
Match ^/(media|skin|js)/ Return
RequestURI exists Return
Match .* Rewrite /index.php
}

I got a popup message.
A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.

Script: http://dev08.local/setup/pub/angular/angular.min.js:151


seem rewrite rules not work for magento 2, I don't know how to fix it work. anyone got rewrite fo magento 2 on hiawatha 10.1 please help, really thank you.
Hugo Leisink
30 March 2016, 09:36
Looks like Magento 2 has a different set of rewrite rules. For Apache it is this:
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]

The Hiawatha version is this:
RequestURI exists Return
Match .* Rewrite /index.php

Also set the following option for the Magento virtual host.
HTTPAuthToCGI = yes
Phicheth K.
30 March 2016, 10:26
Really thank you for your help, Hugo Leisink. This is my configuration for magento 2 on hiawatha 10.1 and still not work for me

UrlToolkit {
ToolkitID = magento
RequestURI exists Return
Match .* Rewrite /index.php
}

VirtualHost {
Hostname = dev08.local
WebsiteRoot = /srv/http/dev08.local/public
AccessLogfile = /srv/http/dev08.local/log/access.log
ErrorLogfile = /srv/http/dev08.local/log/error.log
TimeForCGI = 5
UseFastCGI = PHP7
StartFile = index.php
UseToolkit = magento
HTTPAuthToCGI = yes
}


This is my configuration for magento 2 on hiawatha 10.1 and still not work for me

got this message again then web brownser was crashed.

A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.

Script: http://dev08.local/setup/pub/angular/angular.min.js:151


Any idea to fixed?
Hugo Leisink
30 March 2016, 23:36
A script not responding in the browser can only be a Javascript not working correctly. This has nothing to do with Hiawatha.
Kapageridis Stavros
7 April 2016, 02:40
For me sounds like a web browser related issue. Try with a clean browser (no plugins).
This topic has been closed.