• Resolved pitterpat

    (@pitterpat)


    Hi,

    I guess this should be fairly straight forward, but when I try to learn about .htaccess and rewriterule I end up buried in much more complex stuff.

    My WP directory is in https://<my domain>/Wordpress but some users don’t realize that they need to capitalize the “W”.

    So I want to rewrite wordpress to WordPress whenever it appears in a URL.

    Can this be done in with an .htaccess directive in the Apache base path (/var/www/html)?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • actually its simple, there are two database options that you have to change,

    in teh wp-options table, you have to change the root links

    this is in your database:
    i have done this, before there is two fields in the wp-options table
    first one is the “siteurl” option and than “home” option
    change those two to the new link

    than change the folder name from capital to lower

    Thread Starter pitterpat

    (@pitterpat)

    Thanks for the feedback.

    Trouble is, some users use WordPress with the capital “W” and some without.

    So I want a way to accept either one.

    I think this can be done with an entry in .htaccess.

    Thanks

    ohh i see your dilemma, ok than how about use redirect
    a simple
    have the lowercase go to the upper case or visa versa

    <?php
    header('Location: https://www.yourdomain.com/Wordpress');
    ?>

    Thread Starter pitterpat

    (@pitterpat)

    Hi,

    Where would you put this code? It can’t be in the WordPress folder because the user with the incorrect url would never get there.

    Thanks

    right ok so here is your structure

    yourdomian.com/Wordpress this is your correct link

    in yourdomain.com add a file called index.php, and add that code in there
    in in yourdomain.com/wordpress add a file called index.php, and add that code in there

    so you make a folder without the capital “W” and put that index file in there this will redirect the non capital to the capital folder

    Thread Starter pitterpat

    (@pitterpat)

    Thanks!

    I’m going to give it a try. Sounds good.

    Thread Starter pitterpat

    (@pitterpat)

    Thank you vachi!

    It works like a charm.

    It’s only necessary to put the code in https://yourdomain.com/wordpress/index.php (lower case wordpress). That redirects it to https://yourdomain.com/Wordpress. And everything works!

    There is no need for any php in https://yourdomain.com

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to fix https://<my domain>/wordpress to … WordPress’ is closed to new replies.