Camen Design Forum

Delete

(Leave this as-is, it’s a trap!)

To delete this post you must be either the original author or a designated moderator.
The content of the post will be removed but the name and date will remain.

  • The post will be removed completely from the thread, rather than blanked
  • Only posts on the last page of the thread can be removed completely (so as to not break permalinks)

RE: How to use this forum?

Kroc

Ah, the mod_rewrite detects sub-folders and pipes them through the PHP scripts; I knew there was something I was forgetting!

You’ll have to prepend your folder name to the mod_rewrite statements:

before:

~~~
# a folder
RewriteCond %{REQUEST_URI} ^/[^./&]+/$
RewriteCond %{DOCUMENT_ROOT}%0 -d
RewriteRule ^(?:([^./&]+)/)?$ /?path=$1 [QSA,L]

# a thread
RewriteCond %{REQUEST_URI} ^/([^./&]+/)?([^./]+)$
RewriteCond %{DOCUMENT_ROOT}%0.xml -f
RewriteRule ^(?:([^./&]+)/)?([^./]+)$ /thread.php?path=$1&file=$2 [QSA,L]

# an index RSS feed
RewriteCond %{REQUEST_URI} ^/([^./&]+/)?index.rss$
RewriteRule ^(?:([^./&]+)/)?index.rss$ /rss.php?path=$1 [QSA,L]
~~~

After: (replace 'folder' with the appropriate name)

~~~
# a folder
RewriteCond %{REQUEST_URI} ^/folder/[^./&]+/$
RewriteCond %{DOCUMENT_ROOT}%0 -d
RewriteRule ^folder/(?:([^./&]+)/)?$ /?path=$1 [QSA,L]

# a thread
RewriteCond %{REQUEST_URI} ^/folder/([^./&]+/)?([^./]+)$
RewriteCond %{DOCUMENT_ROOT}%0.xml -f
RewriteRule ^folder/(?:([^./&]+)/)?([^./]+)$ /thread.php?path=$1&file=$2 [QSA,L]

# an index RSS feed
RewriteCond %{REQUEST_URI} ^/folder/([^./&]+/)?index.rss$
RewriteRule ^folder/(?:([^./&]+)/)?index.rss$ /rss.php?path=$1 [QSA,L]
~~~

Also, I just realised that the theme links to "/" for the logo, which will go up a folder to web root, you'll need to replace that with "/folder/" instead.

Working from a sub-folder is not a simple problem to solve, esp. when it comes to the mod_rewrite rules.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn