Link to home
Start Free TrialLog in
Avatar of Kasonde Neddy
Kasonde Neddy

asked on

How to enable the mod_rewrite option in your Apache configuration for MAMP on MAC

Hi Experts,

I am trying to setup an application on MAMP, my localhost..using Macbook pro...trouble is when i try to access the application, the links are showing e.g. localhost/stayzed/index.php, instead of localhost:8888/stayzed/index.php   ....I got a response from developer saying I should do the following:

As you have mentioned we have shared the steps to the Issue of .htaccess file.

Please enable the mod_rewrite option in your Apache configuration.

If you're already enabled mod_rewrite option please use the below lines,

RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule .* index.php/$0 [PT,L]
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]

in your .htaccess file (Path: root_folder/.htaccess).

Hope the experts can help resolve this.

Regards
ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kasonde Neddy
Kasonde Neddy

ASKER

Perfect explanation..