Forum Moderators: phranque
RewriteRule ^([a-z0-9_\-]*-(f|all)[0-9]+(p[0-9]+|/index[0-9]*)?\.html)$ forumdisplay.php/$1 [QSA,L]
RewriteRule ^([a-z0-9_\-]*-(t|p)[0-9]+(p[0-9]+|/index[0-9]*)?\.html)$ showthread.php/$1 [QSA,L]
RewriteRule ^[a-z0-9_\-]*-f([0-9]+)(p[0-9]+|/index[0-9]*)?\.html$ forumdisplay.php?f=$1 [QSA,L,R=302]
RewriteRule ^[a-z0-9_\-]*-(t|p)([0-9]+)(p[0-9]+|/index[0-9]*)?\.html$ showthread.php?$1=$2 [QSA,L,R=302] Why are you changing URLs at all? Why not keep the old URLs and rewrite to the files' new location? If you do want to change the URL, why not take the opportunity to change them to something pretty and user-friendly?
RewriteRule ^([a-z0-9_\-]*-(f|all)[0-9]+(p[0-9]+|/index[0-9]*)?\.html)$ forumdisplay.php/$1 [QSA,L]
RewriteRule ^([a-z0-9_\-]*-(t|p)[0-9]+(p[0-9]+|/index[0-9]*)?\.html)$ showthread.php/$1 [QSA,L]
RewriteCond %{REQUEST_URI} !(index\.php|\.css) [NC]
RewriteRule ^(archive|sitemap)/(.*)$ $1/index.php/$2 [QSA,L]
You've said what the URLs used to look like.
What do the URLs that users should see in the browser address bar now look like?
You'll need a redirect from old to new URL only if the URL format has changed.
You'll need to amend the current rewites (but still keeping them as rewrites) if either the URLs have changed or the internal script names have changed.
RewriteRule ^[a-z0-9_\-]*-f([0-9]+)(p([0-9]+)|/index([0-9]*))?\.html$ forumdisplay.php?f=$1&page=$3$4 [L]
RewriteRule ^[a-z0-9_\-]*-(t|p)([0-9]+)(p([0-9]+)|/index([0-9]*))?\.html$ showthread.php?$1=$2&page=$3$4 [L]
[edited by: floid78 at 1:07 am (utc) on Oct 14, 2013]
If you ask for URLs with parameters, does the new PHP script then redirect the request to the new URL format that the new add-on uses?
Options +FollowSymlinks
RewriteEngine on
RewriteBase /vb4/vb/
RewriteRule ^[a-z0-9_\-]*-f([0-9]+)(p([0-9]+)|/index([0-9]*))?\.html$ forumdisplay.php?f=$1&page=$3$4 [L]
RewriteRule ^[a-z0-9_\-]*-(t|p)([0-9]+)(p([0-9]+)|/index([0-9]*))?\.html$ showthread.php?$1=$2&page=$3$4 [L,R=302]
RewriteRule ^archive/[a-z0-9_\-]*t([0-9]+)\.html$ archive/index.php/t-$1.html [QSA,L]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?revleft.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?revleft.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?revleft.org(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?revleft.org(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?google.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?google.com(/)?.*$ [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# Forum
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]
RewriteRule ^blogs/.* blog.php [QSA]
RewriteRule ^entries/.* entry.php [QSA]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# MVC
RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
# Check MVC result
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ - [NC,L]
RewriteRule ^(.*)$ - [R=404,L]
Uhm, except for the upper part, it's the "official" vB 4 rewrite code...
RewriteCond %{HTTP_REFERER} !^http://(www\.)?revleft.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?revleft.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?revleft.org(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?revleft.org(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?google.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?google.com(/)?.*$ [NC] What phranque said, assuming that "have issues" is what the Word Censor puts out when you put in "are ### ###".