WordPress.org

Ready to get started?Download WordPress

Forums

htaccess+wordpress=mod rewrite (2 posts)

  1. pawciak
    Member
    Posted 5 years ago #

    To be honest im a newbie with htaccess. I have some problems with it - especially with mod rewrite but lets start from the begining. my public_html looks like that:
    +wp
    +images
    index.html
    404.html
    ...
    main.html
    .htaccess

    and of course the wp directory is the one with WP. I want to have a start page with different name than index - in my case it is main.html so i added a line to htaccess:
    DirectoryIndex main.html
    And it should works but.. I have a menu bar in this file(main.html) with links to pages in my wordpress so they looks like that:
    wp/index.php
    wp/index.php?id=4
    ...
    and in theory it should works.but only in theory. When you will click on that link nothing will change. URL in web browser will change for example: mydomain.com/?id=4 but this is only thing which is changing - the url in browser but pages dont appear. so i think there is a problem with connection with my index.php file in wp directory. the worst thing is that with this htaccess with directoryindex main.html don't work wp-admin and there are problems with images. So how to fix this problem how to write correct htaccess? The most important thing to me is redirection of url. I dont want to move wordpress from wp dir to root - i want to have that when you will type in browser http://www.mydomain.com url only with files like index etc. I dont want to see http://www.mydomain.com/wp/... how to do it;/?

  2. Sina-M
    Member
    Posted 5 years ago #

    Question is why you install it in "wp" directory when you able install it in your root directory?

    it better you move your directory from wp to your root directory.

    or test it:
    ##########################
    Options +FollowSymlinks
    RewriteEngine On

    DirectoryIndex main.html
    ##########################

Topic Closed

This topic has been closed to new replies.

About this Topic