Welcome to WebmasterWorld Guest from 54.242.134.77

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess rewrite condition

     

camchoice

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

5+ Year Member



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]

MattyUK

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

10+ Year Member



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.

Matt

jd01

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

WebmasterWorld Senior Member 10+ Year Member



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.
Justin

 

Featured Threads

Hot Threads This Week

Hot Threads This Month