Bring local site to live site url not working - php

I have developed a site using drupal 7. I have moved my site from local server to live server.
But the live Url not opening my sites index page. For example, my web site address is http://test.com. But if i change the URL like http://test.com/2index.php it works well. Somebody help me please

File name should be index.php not 2index.php.

I agree the that file name should be index.php, however if there is some reason why the name must be 2index.php and you want it to serve as an index, you need to modify your apache config file to include "2index.php" as one the options for the "DirectoryIndex". The config line may look like this:
DirectoryIndex index.php index.phtml index.html index.htm 2index.php

Related

Webiste url are not routing without index.php

I uploaded my website from my UAT/Test domain to EC2 AWS. Before everything was fine, but now only home page opens.
And if I try to navigate to any other links I can't, it gives following error
The requested URL /page/company was not found on this server.
But when I insert index.php in between it works fine.
Any ideas?
Please enable mod_rewrite module in your server and rewrite index.php in htaccess file.
Please check your file premissions
I believe the issue could be DirectoryIndex which apache (not positive that is what you are using as web server) uses to direct the user to a specific file if a directory is selected in the URL.
This can be set in your apache config if you have access, or in a .htaccess file if you only have access to the your webspace itself.
http://www.htaccess-guide.com/directoryindex-uses/
Basically with DirectoryIndex you can tell apache to automatically use index.php, or index.html, or really whatever file you want to be used when no file in a directory is given in the URL.

PHP page in the wwwroot folder

I am trying to upload my localhost site that I am making to the live server. Before I did that I made a test with a "hello world" index.php
When I place my index.php on the following path the page is working:
but that is not in the wwwroot.
When I place the index.php in the wwwroot folder I do not get to the hello world page. I just get the domain page.
How can this be? I also noticed that my page should be dangerous in the URL bar. It is just a portfolio, there is nothing dangerous on that site.
According to discussion in comment,
You need to set/change your DOCUMENT_ROOT directive as below
DOCUMENT_ROOT /customers/0/f/c/vouzalis.com/httpd.www
to
DOCUMENT_ROOT /customers/0/f/c/vouzalis.com/httpd.www/wwwroot
If you are not managing your server, you can ask hosting for setup.
You need to verify your Apache VirtualHost configuration. You need something like:
DocumentRoot /wwwroot/

site only shows all info from index.php?

Sorry if this is a basic question, but Im wondering why my site doesn't display correctly unless I utilize the index.php extension. Here is an example :
www.copishboutqiue.com/salon
which displays incorrectly but
www.copishboutique.com/salon/index.php displays the correct layout we're using. Why do I need to use the index.php when this is the only file in the root directory?
if you are using an apache server create a .htaccess file in the root directory of your website and add
DirectoryIndex index.php

Website - Not Showing Index

Ok, I am very new to web development, so excuse that. I set up my webserver using a Linode Stackscript (LAMP). However, my webpage doesn't display my actual index.php file, instead, it displays http://www.imgbomb.com/i/?lBqKe. Why is this? My index.php is inside my www. When I type /index.php after the url, I get a the page you are looking for is not found.
You should add DirectoryIndex index.php to your .htaccess file or webserver configuration file.

Two basic PHP, Apache on Ubuntu questions

I have a small little site I am testing, first time using PHP. It is sitting on an Ubuntu box, in the /var/www folder. I can get to it in my internal network, but I can't get to it outside. I have port 80 forwarded to my Ubuntu box in my router. That is the first question. Second, how do I designate the first page to be served when you get to that box. The default Apache page is index.html. I want a page called login.php to be first. I have renamed index.html to html.old, but then I just get a file listing. Any help, much appreciated.
For custom index page place this in your .htaccess (in root folder)
DirectoryIndex login.php
I don't understand your first question.
For the apache default page, you can either go find your httpd.conf file edit this:
DirectoryIndex index.html
Or you can add the following to a .htaccess file:
DirectoryIndex login.php
2) Delete or move index.html. Rename login.php to index.php or create a new index.php with
<?php require dirname(__FILE__) . '/login.php';
Thats the most basic ways to do this. There are many there solutions, but it seems to me, that this is sufficient in your case.
This works, because the apache by default is looking for several index.*-files (in order).

Categories