SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wordpress mod_rewrite

    I've just installed wordpress into the directory /wordpress/

    I've also set the permalinks to custom: /%postname%/

    what i want to do is this:

    whenever i type www.mydomain.com/index.php, i want it to look for www.mydomain.com/wordpress/index.php and completely skip the main directory. or if i type www.mydomain.com, it'll go to www.mydomain.com/wordpress/

    here is what i currently have in the .htaccess

    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>
    # END WordPress
    i have also tried
    Code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress
    i don't want a redirect, meaning when a user types "www.mydomain.com" onto their address bar, i don't want the address bar to redirect them and say "www.mydomain.com/wordpress" i want a rewrite. please help.
    Best,
    Mikko

  2. #2
    SitePoint Addict Newviewit's Avatar
    Join Date
    Apr 2008
    Posts
    241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    301 redirect in htaccess

    Redirect 301 /index.html http://example.com/newdirectory/
    UNLIMITED Domains - UNLIMITED Disk Space - UNLIMITED Bandwidth
    *Black Friday - Website Hosting Deal of The Year - 50% OFF!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •