WordPress.org

Ready to get started?Download WordPress

Forums

htaccess modrewrite and other scripts in sub directories (2 posts)

  1. luuuciano
    Member
    Posted 4 years ago #

    Hi!

    I have wordpress running in the main directory /
    but then, I have a /wiki directory (with a wiki in there)

    There is no way to exclude .htaccess modrewrite in some places?
    To not have those ugly 404, and have a running wiki instead...

    I have this .htaccess

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

    searching for a solution I have found this line
    RewriteRule ^(wiki|otherdirectory) - [L]

    but how to add it properly?
    I have tried it without luck... :(

    any idea?

  2. luuuciano
    Member
    Posted 4 years ago #

    ohhhh... and this is the wiki .htaccess... Im just dead

    ### STOP REFERRER SPAM
    SetEnvIfNoCase Referer ".*(adultsite|picturesplace|learnthebiz|pi-o|erotica|ghettoinc|port5|bulk-email|camgirls|paris-hilton|modelos|kredit|handyflirt24|versicherung|wwww|erotower|krank|x-1000|flirtnet|blowjob|agedwife|in-the-vip|boysfirsttime|milf|captain-stabbin|tranny|Kontakt|erotik|fetish|frauen|hardcore|fick|krankenversicherung|jinnan-cross|8thstreet|xxx|XXX|ficken|fuck).*" BadReferrer
    
    order deny,allow
    deny from env=BadReferrer
    
    <IfModule mod_rewrite.c>
    	# turn on rewrite engine
    	RewriteEngine on
    
    	# if request is a directory, make sure it ends with a slash
    	RewriteCond %{REQUEST_FILENAME} -d
    	RewriteRule ^(.*/[^/]+)$ $1/
    
    	# if not rewritten before, AND requested file is wikka.php
    	# turn request into a query for a default (unspecified) page
    	RewriteCond %{QUERY_STRING} !wakka=
    	RewriteCond %{REQUEST_FILENAME} wikka.php
    	RewriteRule ^(.*)$ wikka.php?wakka= [QSA,L]
    
    	# if not rewritten before, AND requested file is a page name
    	# turn request into a query for that page name for wikka.php
    	RewriteCond %{QUERY_STRING} !wakka=
    	RewriteRule ^(.*)$ wikka.php?wakka=$1 [QSA,L]
    </IfModule>

Topic Closed

This topic has been closed to new replies.

About this Topic