![]() |
|
Thread Tools |
#1
|
||||
|
||||
Help with couple of mod_redirect rules
Since, I just got rid of vbseo, now I am trying to deal with redirect as much as possible. Taking care of threads was easy however still urls like tags, attachments etc. remains.. so, I hope guys here may help me through with their wisdom in mod_rewrite rules .. regex
So, I am stuck on this.. wants to do following: redirect: domain.com/talk/tags/letter.html (letter is tag) To domain.com/talk/tags.php?tag=letter I tried this
But its not working. My forum is at : domain.com/talk And I am adding above rule in domain.com/talk/.htaccess with "RewriteBase /talk/" . This is where I have added thread redirection code which works fine.
__________________
..... No members have liked this post.
|
#2
|
|||
|
|||
Hmm it should work fine..
What if you remove the slash before tags.php in your rewrite rule?
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com Contact me for custom vBulletin 3/4 work & server/website management. No members have liked this post.
|
#3
|
|||
|
|||
Nope its not working, and if I remove / from tags.php , it will add absolute path to the file.. but here first thing is that it should detect the rule at first place.
__________________
..... No members have liked this post.
|
#4
|
||||||||
|
||||||||
Maybe you want [^.], like
ETA: Hmm...or in case tags can show up elsewhere in the path, maybe both . and /, like
No members have liked this post.
|
#5
|
|||
|
|||
Could it be that an other rewrite rule is being applied before it reaches that one? Can you post all the contents of your .htaccess file?
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com Contact me for custom vBulletin 3/4 work & server/website management. No members have liked this post.
|
#6
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
Originally Posted by kh99
![]()
Thanks guys, it worked with following: (and yes there were some conflicting rules from default vb)
Now I need to handle attachment urls : Its like :
Here 2451 is image ID: I did this :
Again not working.. No matter how much I read about regex, its always confusing for me, can you guys confirm if I read it correct : [^/] mean any character except / so, [^./] means any character exept . and / am I reading it right ? --------------- Added 23 Sep 2015 at 23:36 --------------- Well.. I donno but now its working .. for precaution I have added condition for attachment url redirect:
Is it as I think, ie. first checking condition if URI contains /albums/ word and then only proceed for further match and redirect ?
__________________
..... No members have liked this post.
|
#7
|
||||
|
||||
I know Joe @BirdOfPrey... oh ya,, vb doesn't do that
![]() Well anyways, he helped me out tremendously with some redirects. Maybe He'll see this thread and post.
__________________
No members have liked this post.
|
![]() |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mini Mods Signature Rules - post rules for users to follow | SonicGT | vBulletin 4.x Add-ons | 42 | 01 Mar 2020 13:42 |
Forum Display Enhancements New look for Posting Rules (Rules at the bottom of forum display) | Hell Bomb | vBulletin 3.8 Template Modifications | 5 | 14 Nov 2010 01:18 |
BLS - addon to RULES AND USER AGREEMENT HACK: rules to selected forum | Bolas | vBulletin 3.0 Full Releases | 21 | 25 Nov 2006 14:16 |
BLS - addon to RULES AND USER AGREEMENT HACK: rules to child forum | Bolas | vBulletin 3.0 Full Releases | 0 | 13 Apr 2005 22:35 |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 05:04.