SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: URL rewrite

  1. #1
    SitePoint Evangelist dscriptor's Avatar
    Join Date
    Oct 2005
    Location
    in front of my computer
    Posts
    571
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question URL rewrite

    Hi,

    need your help guys..

    i have a site: mydomain.com
    files are located in /home/dl/www.domain.com/cms/web

    the main mydomain site is using symfony framework, thus the structure above.

    and im trying to configure wordpress URL rewrite for mydomain.com/wp

    the first guy who installed it, put the WP files in /home/dl/ftproot/www

    when you browse the /home/dl/www.domain.com/cms/web directory it has wp folder which is just a symbolic link to /home/dl/ftproot/www

    now the problem is the htaccess URL rewrite generated by Wordpress for Permalinks doesn't work..

    any idea? what should be the htaccess looks like?

    any help will be greatly appreciated.

    thank you!

    current htaccess codes:
    HTML Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule  . index.php [L]
    </IfModule>
    happy is the man that finds wisdom....wisdom in {PHP}.


  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    ds,

    As you've discovered, the symlink is messing everything up! WHY did your guy park the WP files in another directory (outside the webspace)? WHY didn't you move it back to your webspace and avoid the headaches he caused?

    As for your mod_rewrite code, that's WP's standard fare: CHECK FOR mod_rewrite THEN check for file, directory or symbolic link (it "treats the TestString as a pathname and tests whether or not it exists, and is a symbolic link") then redirect to their handler page. With that, I have to add that any webmaster would KNOW whether mod_rewrite is enabled or not and would REMOVE the mod_rewrite check which is otherwise made for EVERY FILE REQUEST.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


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
  •