• I had my blog working on an Apache 2.0 web server, until I changed the default page in the directory to index.htm for production, instead of index.php. All links have /? instead of /index.php? that is needed to work if index.php is not the default page.
    Is there a simple way to insert index.php here?
    I looked at permalinks, and attempted some URL rewritting, all in vain.

    Thanks in advance,
    Seth

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi,

    Funny, I have the same problem with my ISP. I have many installs of WP (1.5 or 2.0) on Linux/Apache2 on my home PC which all work fine. I just tried to use WP on my public ISP page, and all links that use the “{URL}/?” syntax (e.g. {URL}/?page_id=2 to display the “About” page) will not work.

    But if I replace {URL}/?page_id=2 bye {URL}/index.php?page_id=2 it all works fine. Is there a way to for the full filename to be used, or some specific setup on the apache server to be changed ?

    …Caribou

    Thread Starter sethmurphy

    (@sethmurphy)

    A simple fix would be to put index.php before index.html in the directory index in http.conf(or equivalent), or possibly delete any index.html files that exist.However, I wish to have index.html as the default page. If you do not, this may help.

    i.e.
    before:
    DirectoryIndex index.html index.html.var index.php

    after:
    DirectoryIndex index.php index.html index.html.var

    The server then passes the request to index.php, and the queery string parameters are parsed correctly.

    Seth

    Thread Starter sethmurphy

    (@sethmurphy)

    Caribou,

    I came up with a wordpress based hack, but think there must be a better answer with Apache and URL rewritting.

    Here it is:
    in the file wp-includes/template-functions-links.php

    replace all ‘/?’ with ‘/index.php?’

    This will break with an upgrade, but get’s the job done.
    Looking at the code it is obvious there is no application setting that addresses this in particular, as this part of the link is hardcoded within hte particular functions.

    I hope this helps anyone with a similiar issue.

    Seth

    Thread Starter sethmurphy

    (@sethmurphy)

    on second thought, that only fixes a few links …

    also need to change in file:

    template-functions-category.php

    might be too many places to make changes cleanly.
    However, I am sure you get the idea.

    Doesw anyone out there know URL rewriting well enough to post an example to do this with Apache?

    Thanks in advance,

    Seth

    Thanks for the info Seth.

    This might be what I’ll need to do as I don’t expect my ISP to change his server setup for me ??

    …Caribou

    One thing about Seth’s brute force workaround is that it is a workaround, since a standard setup works fine on most of my Linux installs.

    Why don’t you try to use the nice permalinks in wordpress?

    Thread Starter sethmurphy

    (@sethmurphy)

    Caribou is correct, my solution is not the answer I am looking for either.

    I tried to use the permalinks(which just create URL rewriting rules) with no success. Any advice would be appreciated. I will be using them anyhow in order to optimise for SEO.

    Thanks,
    Seth

    Why not use the /index.php/permalink/here rules?

    Hi,

    Took me a while to come back to this.

    It seems that I cannot use the permalink feature since my two cents provider doesn’t support mod_rewrite.

    As Seth indicated, I would like to know if there is a way to keep WP from using the {URL}/?page_id or syntax like this, i.e. just dropping the index.php filename ?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘urls do not contain …/index.php?… , but just …/?…’ is closed to new replies.