WordPress.org

Ready to get started?Download WordPress

Forums

How can I exclude a directory in the .htaccess file? (3 posts)

  1. Drachsi
    Member
    Posted 1 year ago #

    I have the following code in the .htaccess file.

    # 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]
    # END WordPress
    
    RewriteRule ^category(.*)/(.*)\.(php|js|css)$  http://www.drachsi.com/general/link-generator/$2.$3	[R,nocase,NE]
    RewriteRule ^category(.*)(/images)(.*)$  http://www.drachsi.com/general/link-generator/$2$3	[R,nocase]
    
    RewriteRule ^category/(.*/)*([^/\.]+)/([1-9][0-9]*)\.htm/?$ index.php?newid=$2&pg=$3	[nocase]
    RewriteRule ^category/(.*/)*([^/\.]+)/?$ index.php?newid=$2	[nocase]
    RewriteRule ^category/?.*$ http://www.drachsi.com/general/link-generator/index.php	[R,nocase]
    </IfModule>

    The problem is it stops the second part from functioning.

    I have been told there is code which will disable the /general folder. Can anybody help?

    Regards
    Drachsi

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Move the WordPress block to the end of the .htaccess file.

  3. Drachsi
    Member
    Posted 1 year ago #

    That only stopped everything.
    Drachsi

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags