Welcome Guest. Please Login or Register  


You are here: Index > Webuzo > General Support > Topic : Problem with mod_rewrite on Apache



Threaded Mode | Print  

 Problem with mod_rewrite on Apache, .htaccess file causes a 500 server error just by being present (3 Replies, Read 220 times)
mscheyndel
Group: Member
Post Group: Newbie
Posts: 2
Status:
Hi

I'm having an issue I'm not sure how to easily fix. The website I'm porting into Webuzo requires mod_rewrite. Whenever I drop a .htaccess file into the directory, it causes the server to stop serving all content and produce a 500 error. I've traced the problem to the following rules:
-------------------------------------------------
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?r=$1 [L]
---------------------------------------------------

I'm wondering if it's because mod_rewrite is not enabled, but I haven't been able to figure out where to go to check/enable this.

Any assistance would be greatly appreciated!

Martin,
IP: --   

Problem with mod_rewrite on Apache
Surajyadav13
Group: Member
Post Group: Newbie
Posts: 9
Status:
Hi,



Sir apache mod_rewrite is enabled by default .

you can check using following command:



Coderoot > /usr/local/apps/apache/bin/httpd -M



IP: --   

Problem with mod_rewrite on Apache
Surajyadav13
Group: Member
Post Group: Newbie
Posts: 9
Status:
Sir if the issue persists you can open the support ticket with us so we can assist you better.

https://softaculous.deskuss.com
IP: --   

Problem with mod_rewrite on Apache
mscheyndel
Group: Member
Post Group: Newbie
Posts: 2
Status:
All taken care of!

I did open a ticket at the same time I made this post. Tech support signed in and fixed the issue within hours of creating the ticket and my problem was resolved fast. I'm actually quite pleased with the support that was provided. For anyone wondering what my problem was. It was simply that the .htaccess file had some comments in it. Our old provider could handle a comment like this:
-----------------------------------------------------------------------------------
RewriteCond %{SCRIPT_FILENAME} !-d #comment line here
-----------------------------------------------------------------------------------

but in this system the comment had to be on it's own line like this:
-----------------------------------------------------------------------------------
#comment line here
RewriteCond %{SCRIPT_FILENAME} !-d
-----------------------------------------------------------------------------------

Simple enough. I'm almost embarrassed I didn't figure it out on my own! Thanks for the quick support!

Martin
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 28, 2024, 6:39 pm.

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