We help IT Professionals succeed at work.
Get Started

SUPER-URGENT! MVC / RewriteRule .htaccess issue on live server

500 Views
Last Modified: 2012-04-17
Hi.

I have an htaccess file that performs MVC routing (file content below).  This works perfectly on local, and staging servers, however fails for some reason on live.

I have ABSOLUTELY no idea whats going on.  If I enter the following url:

http://ggmr.co.uk/home

typically this gets redirected to http://ggmr.co.uk/route.php and the MVC framework kicks in and serves up the correct content.

The problem on live is that the router object receives this:

http://ggmr.co.uk/route.php/home

.. whereas normally it receives this:

http://ggmr.co.uk/home

.. instead.  Why?!?!

htaccess:

#Default document
DirectoryIndex index.php

# Turn rewriting on
Options +FollowSymLinks
RewriteEngine On

# Send request via route.php but only if its not a real file or folder
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://ggmr.co.uk/route.php/$1 [L]

Open in new window


Currently our site is down and I need help urgently please!!

Thanks, TheFoot
Comment
Watch Question
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 20 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE