LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

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


Hello,

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:

http://site.com/index.php/something/something_else

they were looking like that:

http://site.com/something/something_else

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

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

</IfModule>
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 google.com 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,688

Rep: Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658Reputation: 2658
question have you called the host and asked if they allow / have setup "mod rewright "
Have you read the apache 2.2 docs ?
http://httpd.apache.org/docs/2.2/
http://httpd.apache.org/docs/2.2/howto/htaccess.html
 
Old 04-14-2009, 02:38 AM   #3
OMT
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.
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:27 AM.

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