WordPress.org

Ready to get started?Download WordPress

Forums

.htaccess rewrite conflict problem with another script. (3 posts)

  1. senaia
    Member
    Posted 7 years ago #

    Hello

    I have phpld script installed in root and wordpress installed under the folder blog.

    I have this code in .htaccess for the phpld rewrite rule:

    # URL rewrite rules
    <IfModule mod_rewrite.c>
    RewriteEngine On

    ## Details Link Page Rewrite##
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule (.*)detail/link-(.*).htm[l]?$ detail.php [QSA,NC]

    ## Pagination Rewrite
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule (.*)page-(\d+)\.htm[l]?(.*)$ $1/?p=$2 [PT,NC]

    ## Category redirect
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.*)$ index.php [QSA,L]

    </IfModule>

    Now I need to add this code for wordpress in order to get seo friendly url's:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>

    When adding the wordpress rewrite code in .htaccess file, the phpld url's goes to 404. Any idea's how to go around this ?

    Do I create a new .htaccess file and placed in the folder Blog ??

    Thank You

  2. rob1n
    Member
    Posted 7 years ago #

    Yes, create a .htaccess with JUST WordPress' rewrite rules, then put that in blog/.

  3. senaia
    Member
    Posted 7 years ago #

    Perfect. Thanks a million :)

Topic Closed

This topic has been closed to new replies.

About this Topic