Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2015-01-12
2
Medium Priority
?
2,225 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 51

Accepted Solution

by:
Steve Bink earned 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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…
Suggested Courses

604 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