Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-13-2009, 06:36 PM   #1
LQ Newbie
Registered: Sep 2005
Distribution: Slackware
Posts: 15

Rep: Reputation: 0
Broken .htaccess on Apache2.2


I've been developing a website. The server I was developing it on was Apache1.3. Then I moved it to a hosting with Apache2.2. The site itself is working as usual, no problems at all. Problems came from the .htaccess file. This file was removing the "index.php" from the URLs, so instead of looking like this:

they were looking like that:

With Apache1.3 the file was OK. When I moved it to the Apache2.2 it got broken. Here is the file itself:
<IfModule mod_rewrite.c>
  RewriteEngine on

  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [QSA,L]

What I want to ask is what should be changed in those settings so the .htaccess would work like it worked on Apache1.3?

A few notes: first, I don't have access to the httpd.conf on the new hosting. Second, mod_rewrite is allowed, since I tried a redirect to through the .htaccess and it worked. Third, the directory where the website resides is the root (not a real root, but a jailed one).

I'm sorry if there had been a thread on this one before, couldn't find it.

Thank you!
Old 04-13-2009, 06:59 PM   #2
John VV
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
question have you called the host and asked if they allow / have setup "mod rewright "
Have you read the apache 2.2 docs ?
Old 04-14-2009, 02:38 AM   #3
LQ Newbie
Registered: Sep 2005
Distribution: Slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Yes, as I said I had made tests whether or not mod_rewrite is working, and along with that the support told me that it is working. It is indeed.

Also I had seen the documentation, but I can't work out what is wrong with my directives in the .htaccess file so that they are working on Apache1.3 and not working on Apache2.2.

Last edited by OMT; 04-14-2009 at 03:08 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 .htaccess and virtual hosts wacko_cracko Linux - Server 2 05-02-2008 11:17 AM
Apache2 .htaccess redirect problem raven Linux - Networking 0 08-06-2007 02:35 AM
Apache2 htaccess problem ghostz00 Linux - Server 3 11-26-2006 11:18 PM
Apache2 .htaccess problem suse 10.0 PB0711 Linux - Networking 2 07-12-2006 11:23 AM
apache2 + htaccess + ssl rubella Linux - Security 1 02-07-2006 05:17 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:43 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration