• Resolved opexresources

    (@opexresources)


    I might be missing something fundamental about index.php but…

    I have no problem at all creating a redirect as follows:

    From: /app
    To: /new-page-name/

    BUT, when I try to the same with index.php in the URL (my old website had index.php in all its URLs) as follows, the redirect does not work.

    From: /index.php/app
    To: /new-page-name/

    Is there a solution to this? And a particular reason why it doesn’t work

    (PS I notice that /index.php automatically goes to my homepage – I didn’t set this up and I notice that I CAN get /index.php/ to forward to a new URL in the Redirection Plugin

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author John Godley

    (@johnny5)

    Your server may be catching the index.php and directly handling it, not allowing WordPress/Redirection to run.

    Can you list a URL that isn’t working?

    Thread Starter opexresources

    (@opexresources)

    Thanks for taking the time to respond – particularly given that you authored the app – it’s much appreciated. As you might have guessed, I’m not very IT literate, but I think this is what you’ve requested.

    I’m trying to set up a redirect for:
    http://www.opexresources.com/index.php/signup
    (This is an old URL from our old website before we updated it and started using WordPress.)

    In the Redirection plugin, it gets abbreviated to /index.php/signup

    The URL that it should forward to on our new site is:
    https://opexresources.com/contact-us/

    If we can solve this one, we have about 5-10 other old URLs that we need to redirect.

    Given that, when there is no redirect for /index.php, something (not the Redirection plugin) is automatically forwarding https://opexresources.com/index.php (not that I would normally type that in) to https://opexresources.com/ I suspect that you might be right, in that something else is picking up the “index.php” and thinking it knows what to do with it.

    HOWEVER, if I set up a plugin redirect for /index.php or /index.php/ I CAN get them to redirect successfully (so they appear to overwrite anything else), but the moment I add anything after /index.php/ the redirect fails.

    We’re using a Hosted WordPress site and use the Avada theme.

    Thanks in advance.

    Plugin Author John Godley

    (@johnny5)

    If I access http://www.opexresources.com/index.php/signup then I get this message:

    No input file specified

    This is from your server, not from WordPress, which suggests that something in your server’s setup is configured to handle index.php/something differently – it is probably looking for that file to actually exist

    http://www.opexresources.com/index.php is different from index.php/something as index.php is the default index page and probably just redirects to /, and may even go through WordPress

    So your options are to see if you can configure your server to not handle index.php/something/ differently. If you have a .htaccess file then it may be handled there, or it may be at a higher level than you have access to.

    You might be able to use Redirection to create the redirect and then save this to your .htaccess file. This should then work as it doesn’t need WordPress to load.

    Failing all of that you could create the file index.php/signup and put some PHP code in it to redirect. Something like:

    <?php
    
    header( 'Location: /contact-us/' );
    • This reply was modified 6 years, 6 months ago by John Godley.
    Thread Starter opexresources

    (@opexresources)

    An update:
    We have manually edited our .htaccess file with these redirections, and they work.

    You said: “You might be able to use Redirection to create the redirect and then save this to your .htaccess file.” I can’t see how to do that however.

    Thanks for your help though – problem solved.

    Plugin Author John Godley

    (@johnny5)

    Great. If it’s any use you can export redirects from the import/export page as .htaccess, and you can setup a group to use the Apache module, and change Redirection settings to export directly to a .htaccess file

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problems with index.php in source’ is closed to new replies.