Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : AMPPS 1.9 mod_rewrite is not working with php 5.2.17



Threaded Mode | Print  

 AMPPS 1.9 mod_rewrite is not working with php 5.2.17, As the title says,, AMPPS 1.9 mod_rewrite is not working with php 5.2.17 (3 Replies, Read 8070 times)
ownmaker
Group: Member
Post Group: Newbie
Posts: 1
Status:
Hi Guys,

As the title says,, AMPPS 1.9 mod_rewrite is not working with php 5.2.17. I see it`s enabled in apache config. What am I missing?

Help,
Tuugii
IP: --   

AMPPS 1.9 mod_rewrite is not working with php 5.2.17
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Run the following command in Command Prompt/Terminal [Windows/Mac] :

Code
path\to\Ampps\apache\bin\httpd -D DUMP_MODULES


It will show whether the module "rewrite_module" is loaded.

In case if it is not, you can enable it from AMPPS Application -> Apache Tab -> Configuration. Uncomment the line :

Code
LoadModule rewrite_module modules/mod_rewrite.so


And restart apache.

Edited by tidus : September 22, 2012, 5:48 am

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

AMPPS 1.9 mod_rewrite is not working with php 5.2.17
cjlees01
Group: Member
Post Group: Newbie
Posts: 2
Status:
I'm having the same problem.
If I follow tidus' advice and check whether it is loaded, then I can see rewrite_module is loaded fine. My .htaccess file is in my web root but it isn't being read.
Is there something else I should check?
IP: --   

AMPPS 1.9 mod_rewrite is not working with php 5.2.17
cjlees01
Group: Member
Post Group: Newbie
Posts: 2
Status:
Apologies, I solved my problem. Wanted to post my mistake in case it helps others.

I copied the .htaccess file from my production site. It's a really simple file to strip out index.php from URLs which are needed by the PHP framework I'm using (CodeIgniter).

RewriteEngine on
RewriteCond $1 !^(index\.php|assets|fonts)
RewriteRule ^(.*)$ /index.php/$1 [L]

When I copied the site locally, I put it in a subdirectory called 'dev' of my www root. When .htaccess was read, Apache looked for the index.php file in the root directory and not in my 'dev' directory, couldn't find it and threw a wobbly.

Simply change the last line to point to the subdirectory to get it working again.

RewriteEngine on
RewriteCond $1 !^(index\.php|assets|fonts)
RewriteRule ^(.*)$ /dev/index.php/$1 [L]


IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is June 1, 2024, 8:50 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.019