Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: mod_rewrite troubles
PostPosted: Sun Apr 24, 2011 2:59 am 
Offline
Newbie

Joined: Sun Apr 24, 2011 2:16 am
Posts: 2
The rewrite goes like this:

Code:
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?page=$1 [L,QSA]


mod_rewrite is working fine and it's enabled, but the page content isn't being displayed properly.

I have another VPS that I decided to upload these files to and test, and when I goto something like example.com/real/page (on the other VPS, different host), it returns correctly on my other VPS with the same code and rewrite. But when I do that on my linode, it just keeps giving me the content from index.php and not the /real/page.

Any ideas what settings I should be looking for that might cause that? The other VPS is a managed one, so I don't really know everything it has.

If you need additional information let me know.


Top
   
 Post subject:
PostPosted: Sun Apr 24, 2011 4:43 am 
Offline
Senior Member

Joined: Sat Nov 27, 2010 8:21 pm
Posts: 63
If it's an old app then it might require register globals to be enabled in php. Try enabling that in your php.ini and see if that helps.

http://php.net/manual/en/security.globals.php


Top
   
 Post subject:
PostPosted: Sun Apr 24, 2011 12:07 pm 
Offline
Newbie

Joined: Sun Apr 24, 2011 2:16 am
Posts: 2
Nibbler wrote:
If it's an old app then it might require register globals to be enabled in php. Try enabling that in your php.ini and see if that helps.

http://php.net/manual/en/security.globals.php


Nope, didn't fix it :/

Incase this helps anyone:

The server it works on is running: Apache v2.2.17 on CentOS, PHP v5.2.16

My linode is running on: Apache v2.2.14 on Ubuntu 10.04, PHP v5.3.2


Top
   
PostPosted: Thu May 26, 2011 12:55 pm 
Offline
Newbie

Joined: Thu May 26, 2011 12:41 pm
Posts: 2
Hi, I'm sorry I can't offer any advice on this one as I have a similar issue with mod_rewrite.

I have Ubuntu 11.04 installation with PHP MyAdmin (working fine) and Apache2. No mail or any extras. The static site comes up, but when I put up a cakephp site, I get a 404 "The requested URL was not found on this server." mod_rewrite is enabled, apache was restarted. The .htaccess files are all there, confirmed and correct. The site works locally, it works on cheapo shared host, but somewhere in the apache2 installation is the magic key that I can't find.

I'd appreciate any help. Hope the original poster finds a solution as well.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group