How to redirect every inner page with index.php?

7 replies
  • SEO
  • |
Hello Warriors, I am looking for the code for redirecting every inner page of my website opens with /index.php/......html.

My web page Outsource web design & development|it outsourcing|seo outsourcing|outsourcing services is also opening without index.php i.e. http://www.grips.co.in/outsourcing.html. Similarly all of the inner pages of my website having the same problem. And because of this in my webmaster account I find many 404 errors daily. I want the code which I can put in .htaccess to redirect every page with index.php. Thanks.
#indexphp #page #redirect
  • Profile picture of the author weston2012
    Google it for codding help.
    {{ DiscussionBoard.errors[7441797].message }}
  • Jasonbrien,

    It sounds like you have more of a folder directory problem than pages that need to be redirected. For example, where is outsourcing.html stored on your server? Is it in a file named index.php? I would take a look at your file structure on your server instead of trying to redirect things. It is odd that you have a file extension before the end of the URL.

    Check out this basic tutorial on file structure,

    Web Directory Structure

    Hope that helps,

    Shawn
    Signature
    Outsource to the experts...

    We customize your Blog, eBook, Press Release and Sale Copy content with your message.

    {{ DiscussionBoard.errors[7445403].message }}
  • Profile picture of the author jasonbrien
    Thanks for your valuable suggestion 'thecontentauthority'. I want to add here that my website Web development Company India|Seo Services India|web design company|outsource to India is in Joomla and all the working files are in public_html folder. Now what do I need to do overcome this error.
    Signature
    {{ DiscussionBoard.errors[7454015].message }}
    • Not sure if you have resolved this yet but I would try re-installing Joomla at the root of your directory. So if you are using an FTP program to install Joomla, put the package under the very first directory. It should be called html or perhaps your domain name. It can vary based on your host but installing joomla in the very beginning of your directory is the approach you want to take.
      Signature
      Outsource to the experts...

      We customize your Blog, eBook, Press Release and Sale Copy content with your message.

      {{ DiscussionBoard.errors[7469018].message }}
  • Profile picture of the author dadamson
    It actually sounds like you have a directory or folder named "index.php" within your hosted server, you then have built your website within this folder.

    Try moving the entire site up one directory and removing the index.php folder if this is the case.

    You will need to then check over you internal link structure because any hard-coded links in there.
    {{ DiscussionBoard.errors[7454155].message }}
  • Profile picture of the author veecreate
    I think your site had some folder problem, Please check your site URL structure properly
    {{ DiscussionBoard.errors[7454162].message }}
  • Profile picture of the author rockgjmom
    this is from my .htaccess - under global config check sef then rename htaccess.txt to .htaccess and will get tid of the index.php

    RewriteBase /

    ## Begin - Joomla! core SEF Section.
    #
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    #
    # If the requested path and file is not /index.php and the request
    # has not already been internally rewritten to the index.php script
    RewriteCond %{REQUEST_URI} !^/index\.php
    # and the request is for something within the component folder,
    # or for the site root, or for an extensionless URL, or the
    # requested URL ends with one of the listed extensions
    RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
    # and the requested path and file doesn't directly match a physical file
    RewriteCond %{REQUEST_FILENAME} !-f
    # and the requested path and file doesn't directly match a physical folder
    RewriteCond %{REQUEST_FILENAME} !-d
    # internally rewrite the request to the index.php script
    RewriteRule .* index.php [L]
    #
    ## End - Joomla! core SEF Section.
    {{ DiscussionBoard.errors[7468213].message }}

Trending Topics