Welcome Guest, Not a member yet? Register   Sign In
How to use homepage.php instead of index.php?
#1

[eluser]turco[/eluser]
I'd like to prepare a temporary "work in progress" homepage for my website, that will be what users will see when they'll go to www.mydomain.com
So I'm trying to find a way to redirect all CI calls not to index.php, but to homepage.php. I need that so I can continue working on my site even if it's not normally "visibile". I'd like to hide homepage.php from the URI by mod_rewrite technique. What can I do?
#2

[eluser]frenzal[/eluser]
rename the file to homepage.php and change this in the config file:
$config['index_page'] = "";
#3

[eluser]turco[/eluser]
I've already done it. I have also written this htaccess:

Code:
RewriteEngine on
RewriteCond $1 !^(homepage\.php|index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /homepage.php/$1 [L]

and prepared a "work in progress" index.php file

However, if I go to www.mydomain.com, I continue to see my site instead of the work in progress page
#4

[eluser]xwero[/eluser]
Why not use the welcome controller and view that comes with CI. Make it your under construction page and start building your site. If you are not going to temper with the CI internals there is not much that can go wrong.
#5

[eluser]turco[/eluser]
[quote author="xwero" date="1211993791"]Why not use the welcome controller and view that comes with CI. Make it your under construction page and start building your site. If you are not going to temper with the CI internals there is not much that can go wrong.[/quote]

Ok I've almost realized. Now when I call www.mysdomain.com, I can see the temporary page. If I call something like www.mydomain.com/controller/function, I see my website. Last problem: I'd like to see my homepage if I call www.mydomain.com/index.php (now I see the working in progress page). Is it possible?
#6

[eluser]gtech[/eluser]
nvm




Theme © iAndrew 2016 - Forum software by © MyBB