Support » Fixing WordPress » Extra forward slash added causing pages to break

  • WP is creating links like the following:

    Notice the / before the ?. If I click on such a link, the page breaks (the bottom part of the page does not load and the css breaks). If I remove this / and reload the page, it loads just fine.

    How can I resolve this problem?

    I am using Dreamhost and used the one-click install. I installed WP in a directory (wordpress) and moved the index.php file to the domain root snd renamed it. I changed the Blog address in the admin to reflect this. I am not using permalinks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • most likely it is your htacess file that is messed up. try different setups (with and without mod_rewrite) to see if you can get it to work. Also, you may have setup a custom style that adds the / while the server (usually via mod_rewrite) is doing it without the /.

    I do not have an htaccess file.

    In the admin under Options|Permalinks, the default option reads:

    This leads me to think that somewhere in WP the extra / is being added. I have been looking through the files and I cannot find it. I have confirmed that it isn’t happening in via the template theme. What do you mean by custom style?

    Try creating a .htaccess file using the code provided in options->permalinks. Try the different options (like date and name or numberic) to see if it changes the situation. By custom style, I meant tlike this:

    where if you look at the link it uses this:


    under the custom option in permalinks

    default permalink structure = no .htaccess file necessary.

    Is the webserver configured to recognize index.php as a default page?

    Yeah, I was hoping you changed from the default it might eliminate the problem (since there is no index.php anymore).

    Your server sets that up (depends on the server). Usually you can find options on what order to load (index.htm->index.html->index.php and so forth). index.php should be in there by default, but you should check with whoever hosts your server.

    Er…. why if changing from default would you think there would no longer be an index.php? Every theme includes an index.php, as well as the normally resident root index.php.

    no, the mod_rewrite eliminates index.php from the address, leaving on slashes at the end (like an open directory). For example, you can see this page:

    with the index.php hidden from the address. It exists, yes, but the address doesn’t need to show it. This link here:

    Shows the article at a directory (that only exists virtually. The actual link would be something like this link:

    understand these two links ARE THE SAME, and mod_rewrite turns the index.php?p=3 link into something easier for people to read (it’s just plain sexier). Try that and it might help.

    Oh. Pretty silly…. who on earth cares? Not google….

    It actually does help with Google. It places keywords into the link, which aides in the results (you’ll see them bolded in your results). Plus it makes it easier to to read. There is a large following of people that use mod_rewrite to make their websites better, such as online stores that have product names in the URL instead of index.php?product_id=12345

    I admit it is a bunch of work to get it to work, but you can weigh out whether it is worth your time. To me, it matters for my websites, so I spend the extra time.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Extra forward slash added causing pages to break’ is closed to new replies.