Support » Networking WordPress » Of .htacess, Rewriterule and Image cannot be Displayed

  • Resolved Willsm

    (@willsm)


    I am new to WordPress. I installed WordPress 3.3.1 in my local computer, Windows 7. Immediately create multiside.

    Everything so far is working. I can preview a test post (but image cannot be displayed). Then when I published, I got Error 404 for that page just published. I guess this is the url link issue.

    Page link is http://test.myblog.com/2012/01/04/eureka/
    Image is at http://test.myblog.com/files/2012/01/scan0002.jpg

    If I copy the folder ….\htdocs\wp-content\blogs.dir\2\files to …\htdocs\ then the image can be displayed. It means my image upload to blogs.dir is working but the url path does not get redirected correctly or something like that.

    Content of .htaccess is as follows (I copy and paste during the network setup):

    DirectoryIndex index.php index.html
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    file=$2 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]

Viewing 5 replies - 1 through 5 (of 5 total)
  • I also have this problem on a dedicated server in werski 3.1 was OK

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    The image location, and the path, are correct.

    Most likely you don’t have allowoverride set to ALL in your httpd.conf file.

    szysz, thanks for the link, it does contain some information in there for stepping into what may go wrong.

    Ipstenu, thanks for the specific solution and it works great!

    I set allowoverride to All, but get the following error message not presence before:
    C:/WebEn/Apache2.2/htdocs/.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration

    I then uncomment the following in httpd.conf:
    #LoadModule rewrite_module libexec/mod_rewrite.so

    Resolved!
    Many Thanks!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Yes, you MUST have mod_rewrite turned on. It’s a requirement for WordPress if you want pretty permalinks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Of .htacess, Rewriterule and Image cannot be Displayed’ is closed to new replies.