Solved

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

Posted on 2015-01-12
2
1,154 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
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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 look for a specific file type in a local or remote server directory using PHP.

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now