We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

.htaccess variations

Development and Programming

Dan Allen (Houston, TX)'s avatar
Dan Allen (Houston, TX)
35 posts
12 years ago
Dan Allen (Houston, TX)'s avatar Dan Allen (Houston, TX)

Hi,

My favorite part of running EE is .htaccess, because I always am stressed over the fact I don’t understand how it works. Through trial and error, I have managed to get .htaccess to allow ‘index.php’ to be omitted from URLs. It terrifies me every time, because I feel like I am flying in the dark with no instruments.

Here is an example. I have two copies of an EE site running on two LAMP servers, both controlled by Plesk… the funny part is that on one of the servers, the .htaccess RewriteRule that works for dropping index.php from urls is:

RewriteRule ^(.*)$ /prototypes/clientName/index.php/$1 [L]

On the other server it is:

RewriteRule ^(.*)$ index.php?/$1 [L]

The differences are 1. no ?-mark after .php in the 1st example.
2. No path required in 2nd example, even though the relative path to the EE installation is the same on both servers.

I was thinking the same ReWriteRule should work on both servers.

Are there php or Apache settings controlling whether the ?-mark and path are required? Something else?

Any comments, questions, suggestions, information, etc. will be extremely much appreciated.

Thanks.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.