homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

.htaccess rewrite condition

 4:02 pm on Nov 21, 2006 (gmt 0)

Hi There;

I am working on a vbulletin forum addon , which is causing me problems. My forum is located in a subfolder, but the rewrite rule is for the root (I assume). I have only little understanding of rewrite rules. Can somebody tell me how I change the rewrite condition below, so that it will work in my subfolder /forum?

# SEO Videos
# [vbulletin.org...]

# ofcourse you can rename videos.html and make it for example a non existing directory /videos/ and /videos/videoindex-20.xhtml etc.

RewriteCond %{HTTP_HOST}!^www\.domain\.com
RewriteRule (.*) [domain.com...] [L,R=301]

RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^videos\.html&page=([0-9]+)$ [domain.com...] [L,R=301]

RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^videos\.html$ index.php?videos=1 [L]

RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^videos-page([0-9]+)\.html$ index.php?videos=$1 [L]



 3:12 pm on Nov 30, 2006 (gmt 0)

To me at least it really isn't clear what you are trying to accomplish. could you be a tad more explicit with your question please. It could be the reason why nobody has replied yet.



 5:27 pm on Nov 30, 2006 (gmt 0)

If you are trying to go to www.example.com/some-dir/forum you can add some-folder to each side of the rule:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^some-dir/videos-page([0-9]+)\.html$ /some-dir/index.php?videos=$1 [L]

Hope this helps.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved