SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    .htacces url issue

    Hello,
    I have a little problem with showing url of my pages. I have two domains on my server, but their url are messed up.

    When i type www.xyz.com it's normal.

    but when i type www.example.com it's www.xyz.com/something/index.php.

    Any ideas how to fix it?

    PS: I'm newbie both in English and writing .htacces

  2. #2
    Barefoot on the Moon! silver trophy
    Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,524
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    Can you post your htaccess code?
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  3. #3
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here you are.
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress
    And this is the line that i tried to add,
    RewriteCond %{HTTP_HOST} !^/Test/$ [NC]
    RewriteRule ^(.*)$ http://www.lucdrumhardware.com/$1 [L,R]

  4. #4
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And i have one folder for each domain, so:
    /example/ for www.example.com --- Wordpress Blog
    /another/ for www.another.com ---- Shop with bridged blog

    and wordpress i phreaking out after moving, and www.another.com is recognized as subdomain...

    Pls help ^^

  5. #5
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,149
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Hajtosek View Post
    RewriteCond %{HTTP_HOST} !^/Test/$ [NC]
    The host would be something like www.example.com. I can't image that the pattern /Test/ would ever match any host.

    Quote Originally Posted by Hajtosek View Post
    And this is the line that i tried to add,
    It matters, for example, if the line you added came before or after the WordPress code. It would be more useful if you posted the whole contents of your htaccess file, as well as the directory path of that htaccess file, and also make us aware of any other htaccess files you may have in other directories (because they can override one another).
    "First make it work. Then make it better."

  6. #6
    SitePoint Member
    Join Date
    Nov 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found the file that makes that annoying issue....

    <IfModule mod_rewrite.c>
    <IfModule mod_env.c>
    SetEnv HTTP_MOD_REWRITE On
    </IfModule>

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www.lucassdrummer.com$
    RewriteRule . - [E=REWRITEBASE:/TEST/]
    RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

    # AlphaImageLoader for IE and fancybox
    RewriteCond %{HTTP_HOST} ^www.lucassdrummer.com$
    RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
    </IfModule>

    #If rewrite mod isn't enabled
    ErrorDocument 404 /TEST/index.php?controller=404
    When i change lucassdrummer to lucdrumsomething.com, and "TEST" to /ROOT/NEWDirectory will it be ok?


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
  •