shorten URL using .htaccess not working (4 posts)

  1. wplg
    Posted 5 years ago #

    I have WordPress installed in a shared hosing account. WordPress is installed in mydomain.com/public/wordpress.
    I use .htaccess file at mydomain.com to redirect to the WordPress folder which works fine.
    Then I want to take the word "WordPress" out of my path, which I have been trying VERY UNSUCCESSFULLY to do using .htaccess.
    It doesn't "seem" like it should be this difficult, but... Can someone tell me what I have done incorrectly? I have the following .htaccess file in the WordPress folder:

    Options +FollowSymlinks

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^/(.*)$ /$1 [QSA,L]

    # END WordPress

  2. Samuel B

    Posted 5 years ago #

  3. wplg
    Posted 5 years ago #

    Samuel - THANK YOU very much for that piece of information! I would have stopped trying to do that a long time ago, had someone told me it wouldn't work that way :)
    So I followed the directions you noted and it was EASY and fast and worked great! Just one thing left. If someone follows the old path, they get a "partial page" on the site with NOT FOUND in the middle. Not very attractive. (all the pages come up correctly when using the new path, but there are folks with links to the old) What is the appropriate way to redirect the old path to the new?
    Thanks again!!!

  4. Samuel B

    Posted 5 years ago #

    you can redirect with .htaccess - just google redirect with .htaccess and you will get examples

    or use a plugin

Topic Closed

This topic has been closed to new replies.

About this Topic