The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Mod Rewrite - Image Paths
Basically I have /vb35rc1/blogs/username/ rewritten as /vb35rc1/blog.php?do=viewblog&un=username, but all my image paths point to /vb35rc1/blogs/username/images/. I looked up on google and found something like:
Code:
rewriteRule /vb35rc1/blogs/(.*)/images/ /vb35rc1/images/ [L] Thanks |
#2
|
|||
|
|||
Try the following:
Code:
rewriteBase / rewriteRule ^vb35rc1/blogs/([A-z0-9\-\_]*)/images/([A-z0-9\-\_]*)$ vb35rc1/images/$2 |
#3
|
||||
|
||||
You should start from scratch with these rules. Particularly because you are allowing the (.*) everything atom. mod_rewrite is a great first line of defence against hacking attempts so it's always best to specify what you want to put in the parentheses.
What exactly will go in the place of the (.*)'s ? |
#4
|
||||
|
||||
Thanks DV
Their username will go there of course, Dean. |
#5
|
||||
|
||||
Code:
RewriteBase / RewriteRule ^vb35rc1/blogs/([A-Za-z0-9-_]+)/images/([A-Za-z0-9-_]+)/?$ vb35rc1/images/$2 [L] |
#6
|
||||
|
||||
Cleaning URLs for blogging, but the image paths got all messed up after. All my rewrites work fine on my other site, just not the vB one because of how the images are setup.
|
#7
|
||||
|
||||
So do users have their own collection of images or something?
|
#8
|
||||
|
||||
No - so instead of having to type blog.php?do=view&u=1 they have to type /blogs/aj/ , just the result of doing so messed up the image paths (of course not just for me, for all users)
|
#9
|
||||
|
||||
In that case the above rule will not work. Use this:
Code:
RewriteEngine On RewriteBase / RewriteRule ^blogs/([A-Za-z0-9-_]+)/?$ blog.php?do=view&u=$1 [L] RewriteBase will fix your problems with the image paths. put it in your vb3rc1 directory in a .htaccess file |
#10
|
||||
|
||||
Hmm..
Quote:
Code:
RewriteEngine On RewriteBase / RewriteRule ^blogs/([A-Za-z0-9-_]+)/?$ blog.php?do=view&un=$1 [L] |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|