Yii Framework Forum: Alternative To .htaccess When - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Alternative To .htaccess When remote server Rate Topic: -----

#1 User is offline   DonVito 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 10-December 12

Posted 24 December 2012 - 09:44 AM

hi all

thanks to this great community !

I am trying to build my first web application with yii

From what I understood a .htaccess file must be in the project folder

in the localhost every things work fine, but when I upload the whole project my remote server doesn't accept .htaccess files and I get 404 not found (server error not yii error)

there is an alternative to this problem ?

many thanks in advance
0

#2 User is offline   DonVito 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 10-December 12

Posted 24 December 2012 - 10:59 AM

the remote server is YTS/1.19.11
any help please?
0

#3 User is offline   codesutra 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 596
  • Joined: 15-March 11
  • Location:India

Posted 25 December 2012 - 02:29 AM

View PostDonVito, on 24 December 2012 - 09:44 AM, said:

hi all

thanks to this great community !

I am trying to build mu first web application with yii

From what I understood a .htaccess file must be in the project folder

in the localhost every things work fine, but when I upload the whole project my remote server doesn't accept .htaccess files and I get 404 not found (server error not yii error)

there is an alternative to this problem ?

many thanks in advance



Please check Url Manager Rules in main config file and make sure a url which you are trying to access in exist or not.

And you are getting this 404 on index page app then might be you are doing something wrong here regarding your application setup.

if you are trying to develop this first app on your local machine and local server then please check settings for your apache.

And i will recommend you to follow this URLto create your first app with yii. Since you dont need to play with .htaccess in the first stage for app.if you are creating yii app for the first time.you created app by the help of above given link will definitely work without any 404 error.

I hope it will help you.
CodeSutra
0

#4 User is offline   DonVito 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 10-December 12

Posted 25 December 2012 - 08:32 PM

thank you codesutra

the problem is in the remote server YTS is a reverse/forward proxy
I can run my application in other remote server apache based
I am asking if I can run my application in a server different to apache which dont accept .htaccess file

many thanks
0

#5 User is offline   Da:Sourcerer 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,222
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 26 December 2012 - 05:10 AM

DonVito: We're having users who managed to let Yii-based apps run on minimal webservers like nginx and lighttpd with pretty URLs enabled. YTS shouldn't really pose a problem. Can you forward all 404's to your index.php? You should be practicaly done, then.
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
0

#6 User is offline   DonVito 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 10-December 12

Posted 26 December 2012 - 08:05 AM

thanks Da:Sourcerer for your reply

can you please tell me how this forward should be done ?
0

#7 User is offline   Da:Sourcerer 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,222
  • Joined: 30-March 11
  • Location:Berlin, Germany

Posted 26 December 2012 - 02:13 PM

As I am not the slightest bit familiar with YTS ... no :) Please consult the manual for YTS.
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
0

#8 User is offline   DonVito 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 10-December 12

Posted 26 December 2012 - 04:06 PM

many thanks
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users