Reputation: 107
Currently when I open the main URL xyz.com of my web app, it takes the web app to xyz.com/abc/index.php.
I have another directory called 'ghi' in addition to 'abc' in my web app.
I want the web app to open with xyz.com/ghi/index.php instead of xyz.com/abc/index.php.
How do I achieve this so that upon entering xyz.com in a browser, the web app is taken to xyz.com/ghi/index.php instead of xyz.com/abc/index.php?
Upvotes: 0
Views: 44
Reputation: 818
I think you can (and should) achive this goal with using a .htaccess file.. Here is a sample generated via this tool
//Rewrite to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com/ghi/index.php[nc]
RewriteRule ^(.*)$ http://www.example.com/ghi/index.php/$1 [r=301,nc]
Hope this helps..
Upvotes: 0
Reputation: 2361
simply ,place it as the first line after in index.php file
header('location:xyz.com/ghi/index.php');
or else Cpanel and redirect to the URL
Upvotes: 0
Reputation: 107
Create a file index.php inside xyz directory with following code:
<html>
<a href="/ghi">Click Here</a>
</html>
Upvotes: -1