Solved

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

Posted on 2015-01-12
2
1,569 Views
Last Modified: 2015-01-13
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
0
Comment
Question by:kasondeneddy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 50

Accepted Solution

by:
Steve Bink earned 500 total points
ID: 40546839
Have you tried a2enmod?  If you don't have a2enmod installed with your package, you'll need to edit the service's conf files to include this line somewhere:
LoadModule rewrite_module /path/to/mod_rewrite.so

Open in new window

Chances are, your installation already has a file prepared with this declaration, and it just needs to be enabled.  In Ubuntu/Debian systems, this is accomplished by manipulating the mods-enabled/mods-available directories under Apache's server root - just symlink mods-available/rewrite.conf to mods-enabled/rewrite.conf.

In any case, after you enable the mod, remember to restart Apache.
0
 

Author Closing Comment

by:kasondeneddy
ID: 40547045
Perfect explanation..
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question