Part of the EllisLab Network
   
 
.htaccess doesn’t work on hosted server
Posted: 27 January 2007 11:57 AM   [ Ignore ]  
Summer Student
Total Posts:  28
Joined  01-24-2007

Hello

Now that I got CI to run on my local PC… I’m struggling to get it to run on a hosted server hmmm I read the archives, but none of the solutions worked:

<IfModule mod_rewrite.c>
    
RewriteEngine On
    
#RewriteBase /igniter/
    #RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule ^(.*)$ index.php?/$1 [L]
    #RewriteRule ^(.*)$ index.php?/$1 [L]
    
    
RewriteBase /igniter/
    
    
RewriteRule ^$ index.php [L]
    
    RewriteCond
$1 !^(index\.php)
    
#RewriteRule ^(.*)$ /index.php?/$1 [L]
    #RewriteRule ^(.*)$ /index.php/$1 [L]
    #RewriteRule ^(.*)$ index.php/$1 [L]
    
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

I get “Internal Server Error - The server encountered an internal error or misconfiguration and was unable to complete your request” if I call the default controller “welcome” via http://mysite.acme.com/igniter/ -> I expect htaccess to rewrite the URL as http://mysite.acme.com/igniter/index.php?welcome

OTOH, no problem if I delete .htaccess and use http://mysite.acme.com/igniter/

Any idea why? Could it be that the hoster restricts use of .htaccess?

Thanks for any tip.

Profile
 
 
Posted: 27 January 2007 12:59 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Total Posts:  28
Joined  01-24-2007

After more googling, it looks like that hoster allows .htaccess… but not URL rewriting therein hmmm I’ll look for another server.

Profile
 
 
Posted: 29 January 2007 03:51 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  254
Joined  10-04-2006

It do not understand why hosters does not allow urlRewriting by default. Perhaps because they are scared about errors that could be done. But I do not think that it has some security issues ?

Good luck anyway

 Signature 

Sylvain Gourvil
PHP Developer
French scuba divingMotivation and team building

Profile
 
 
Posted: 29 January 2007 04:00 AM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  28
Joined  01-24-2007
Tchinkatchuk - 29 January 2007 03:51 AM

I do not understand why hosters does not allow urlRewriting by default.

In this case, because it used too much CPU.

Profile
 
 
Posted: 29 January 2007 04:04 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  254
Joined  10-04-2006

ok, thanks for this Fred. I use a lot of URL Rewriting but I am not at all an admin.

Good to know.
You’re the man smile

 Signature 

Sylvain Gourvil
PHP Developer
French scuba divingMotivation and team building

Profile
 
 
Posted: 08 February 2007 02:00 AM   [ Ignore ]   [ # 5 ]  
Summer Student
Avatar
Total Posts:  9
Joined  02-07-2007

fredtheman-
If your host uses phpsusexec, you may encounter problems with .htacess (I know myself and many others have).
I am not proficient in configuring the php.ini overrides under phpsusexec, but if this is the case, it might be worth looking into.
Then again, I could be wrong. Wouldn’t be the first time.
Edit: Nevermind, just found your other thread.

 Signature 

Good judgment comes from experience, most of which comes from bad judgment.

chown /usr/beer
unmount /dev/brain

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 66415 Total Logged-in Users: 32
Total Topics: 84757 Total Anonymous Users: 0
Total Replies: 454858 Total Guests: 242
Total Posts: 539615    
Members ( View Memberlist )