Forum Moderators: phranque
i'm using a blog script that has three URL configurations:
?w=user
domain.com/user
user.domain.com
i presently have it set up to domain.com/user, and i was provided with some code to put into my .htaccess, which i've included below.
the problem is, because of either .htaccess or the index.php file (also included) it points to, i'm unable to have ANY other directly accessible folders.
domain.com redirects to /home.php
domain.dom/invalidsubdomain directs to /home.php
SUBDOMAIN.domain.com redirects to subdomain.domain.com/home.php as though the subdomain is ignored completely.
i want to set up a wikipedia thing in wiki.domain.com, so i'd need to be able to exclude the wiki prefix and any folders contained therein (ie wiki.domain.com/subdir)
can ANYONE shine some light on this situation? i've looked through a few sites, and i can't find anything with the solution i'm looking for. couldn't actually find the documentation on apache's mod_rewrite coverage, either, but i'm probably looking for the wrong terms.
any help would be greatly appriciated.
-------------------------------------------
.htaccess
-------------------------------------------
RewriteEngine On
Options +Followsymlinks
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.* - [L,QSA]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^.*/images/(.*)$ /images/$1 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^.*/uploads/(.*)$ /uploads/$1 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/friends/page([0-9]+)/([^/]+)/?$ /friends.php?w=$1&page=$2$3 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/friends/page([0-9]+)/?$ /friends.php?w=$1&page=$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/friends/([^/]+)/?$ /friends.php?w=$1$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/friends/?$ /friends.php?w=$1 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/page([0-9]+)/([^/]+)/?$ /index.php?w=$1&page=$2$3 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/page([0-9]+)/?$ /index.php?w=$1&page=$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^profiles/([^/]+)/([^/]+)/?$ /profile.php?u=$1$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^profiles/([^/]+)/?$ /profile.php?u=$1 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^profiles/?$ /profile.php [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^albums/([^/]+)/([^/]+)/?$ /album.php?u=$1$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^albums/([^/]+)/?$ /album.php?u=$1$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^albums/?$ /album.php?u= [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/archive/([^/]+)/([^/]+)/([^/]+)/?$ /archive.php?w=$1&y=$2&m=$3$4 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/archive/([^/]+)?/([^/]+)/?$ /archive.php?w=$1&y=$2&m=$3 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/archive/([^/]+)/?$ /archive.php?w=$1$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/archive/?$ /archive.php?w=$1 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/([0-9]+)/([^/]+).html$ /entry.php?w=$1&e_id=$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/([0-9]+)/([^/]+)/?$ /entry.php?w=$1&e_id=$2$3 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/([0-9]+)/?$ /entry.php?w=$1&e_id=$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/([^/]+)/page([0-9]+)/([^/]+)/?$ /index.php?w=$1&category=$2&page=$3$4 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/([^/]+)/page([0-9]+)/?$ /index.php?w=$1&category=$2&page=$3 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ /index.php?w=$1&category=$2$3 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/([^/]+)/?$ /index.php?w=$1&category=$2 [L]
RewriteCond %{REQUEST_FILENAME}!-f
RewriteRule ^([^/]+)/?$ /index.php?w=$1 [L] -------------------------------------------
edit: had to remove index.php code due to the post being too large. available on request, i suppose.