The MU forums have moved to

Weird htacces behaviour PLS help :) (6 posts)

  1. zimen
    Posted 17 years ago #


    i have an issue with the htaccess. Installed on a subdir of my website.

    the dir is:

    the htaccess works ONLY if I type the address EXACTLY as written above.

    IF I remove the trailing slash or I try to put a "www" and remove the trailing slash, it redirects to the main index of the website.

    could you help me and tell me what is wrong with it?


    RewriteEngine On
    RewriteBase /rooms/
    # Rewrite to
    RewriteCond %{HTTP_HOST} ^www.(.*)
    RewriteRule ^(.*) http://%1/$1 [R,L]
    #uploaded files
    RewriteRule ^(.*)?/?files/(.*) wp-content/blogs.php?file=$2 [L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*.php)$ $2 [L]
    RewriteRule . index.php [L]

    Thank you very much.


    p.s. when you try it w/out trail slash it will redirect you to the main public_html wich has another redirect to the "/it" dir. That is correct. Thank you.

  2. zimen
    Posted 17 years ago #

    Anyone can please help? I don't know how to resolve this. thank you

  3. pumpkinslayer
    Posted 17 years ago #

    For me... went to worked too

    but oh no... directs me to a signup page for a new blog

    I'm no expert but I'd just mess with the lines that mention your domain name. Perhaps change /rooms/ to just /rooms

    Give it a try and post back.

  4. zimen
    Posted 17 years ago #

    "Perhaps change /rooms/ to just /rooms"

    Could you please tell me where I have to change this? Thanks

  5. andrea_r
    Posted 17 years ago #

    See the code you pasted up above? Second line.

  6. zimen
    Posted 17 years ago #

    Andrea, your solution did not work.

    I'm sure it's a misconfiguration with apache or virtual hosts.



About this Topic