Yii Framework Forum: Url Re-Direct In Yii - Yii Framework Forum

Jump to content

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

Url Re-Direct In Yii Redirect from http://server-ip.com/trackstar to http://server-ip.com

#1 User is offline   pottageville_techie 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 06-February 13

Posted 10 February 2013 - 03:28 PM

Hi,

After setting up the .htaccess rules, I can now redirect my URL from http://my-ip.com/trackstar/index.php to http://my-ip.com/trackstar. However, ideally, I want it to redirect to http://my-ip.com. That is if I type in http://my-ip.com, I should have my trackstar application appear without taking me to http://my-ip.com/trackstar. How do I do this? Can some one help me?

Server: Ubuntu 12.04
Web Server: Apache 2.2


.htaccess file
# Turning on the rewrite engine is necessary for the following rules and features.
# FollowSymLinks must be enabled for this to work.
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
</IfModule>

# Unless an explicit file or directory exists, redirect all request to Yii entry script
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
</IfModule>

0

#2 User is offline   pottageville_techie 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 8
  • Joined: 06-February 13

Posted 19 February 2013 - 05:39 PM

I found out what I was doing wrong. mod_rewrite was not enabled on apache. so I did sudo a2enmod rewrite and everything worked like a charm.
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