| | #1 |
| Elayaraja Rathinavel Join Date: 2016 Location: Tamil Nadu, India
Posts: 23
Thanks: 46
Thanked 3 Times in 3 Posts
|
Hi Friends, I am searching for the https://www.example.com/index.php version of my website but it shows 404 error. My question here is whether i need to redirect the above url to root domain or not??? I think the php file is not created. |
| |
| | #2 |
| Elayaraja Rathinavel Join Date: 2016 Location: Tamil Nadu, India
Posts: 23
Thanks: 46
Thanked 3 Times in 3 Posts
|
To avoid duplicate content issue we used to redirect https://www.example.com/ to https://example.com/ and https://www.example.com/index.php to root domain (https://www.example.com/ to https://example.com/), right??? But in my website https://www.example.com/index.php shows 404 error. |
| |
| | #3 |
| Got Beer? War Room Member Join Date: 2009
Posts: 11,418
Thanks: 1,514
Thanked 5,885 Times in 3,684 Posts
|
Does your site even have an index.php page in the first place? 404 error is the error you get when you are trying to reach a URL that does not exist. |
| |
| The Following User Says Thank You to MikeFriedman For This Useful Post: |
| | #4 |
| Plundering the Web War Room Member Join Date: 2007 Location: , , .
Posts: 9,121
Thanks: 1,507
Thanked 2,622 Times in 1,932 Posts
|
Virtually all servers are set up to look for index.php. index.html, index.asp, index.htm, etc. It's a server setting. If visitor is forwarded to normally index.php if it exists. If it does not exist, then it goes to index.html, and on down the line. You would not get a 404 error unless the index.php did not exist. That's YOUR problem. Create one. There is normally no reason to ever 301 to an index.php, as that is the default setting on virtually all servers for regular Joes. If you have both an index.html and an index.php, then the preferred one set up by the server will load. This is not a 301. Many websites do not want either index.php or index.html as their index page. So they 301 to whatever page they want to load when typing in domain.com You don't even know any of this, and you ask about forwarding to the root domain. Questions like these are caused because people don't learn how websites, servers, and the internet work. It's a magical world, people. Just start learning before you call yourself a webmaster of some domain. Paul |
|
If you were disappointed in your results today, lower your standards tomorrow.
| |
| |
| | #5 |
| Active Warrior Join Date: 2016 Location: India
Posts: 66
Thanks: 33
Thanked 26 Times in 18 Posts
|
Hey just update your .htaccess file for redirection index.php to root domain
|
| |
| | #6 |
| Michael Kohler Join Date: 2012 Location: United States
Posts: 1,280
Thanks: 10
Thanked 328 Times in 285 Posts
|
There's no need to do anything, That page is not a thing that will rank anywhere and no visitor will land to it.
|
| | |
| |
|
| Bookmarks |
| Tags |
| 301, indexphp, redirection |
| |