Working fine for me, thanks.
Mod Rewrite Friendly URLs => .htaccess
Collapse
This topic is closed.
X
X
-
That did not work for me but this does
Code:RewriteEngine on Options +FollowSymLinks #RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f #RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteRule ^threads/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) showthread.php?t=$1&page=$2&%{QUERY_STRING} RewriteRule ^members/([0-9]+) member.php?u=$1&%{QUERY_STRING} RewriteRule ^forums/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) forumdisplay.php?f=$1&page=$2&%{QUERY_STRING} RewriteRule ^blogs/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) blog.php?u=$1&page=$2&%{QUERY_STRING} RewriteRule ^entries/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) entry.php?b=$1&page=$2&%{QUERY_STRING} RewriteRule ^list/([^/]*/)([0-9]+) list.php?r=$1$2&%{QUERY_STRING} RewriteRule ^content/(.*) content.php?r=$1&%{QUERY_STRING}
Comment
-
first rewrite works for me , thanks!
which one is best?Comment
-
Both give my 500 errors but that might be I am on a test forum that you have to log in to get to the forum first?Comment
-
snerdComment
-
-
Comment
-
Nginx rewrites:
Code:rewrite entries/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) entry.php?b=$1&page=$2&$query_string; rewrite threads/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) showthread.php?t=$1&page=$2&$query_string; rewrite members/([0-9]+) member.php?u=$1&$query_string; rewrite forums/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) forumdisplay.php?f=$1&page=$2&$query_string; rewrite blogs/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) blog.php?u=$1&page=$2&$query_string; rewrite list/([^/]*/)([0-9]+) list.php?r=$1$2&$query_string; rewrite content/(.*) content.php?r=$1&$query_string;
Comment
-
OP code worked fine for me - thank you MattyAsiaDon't forget to thank your helpers by clicking on the http://www.vbulletin.com/forum/image...tation-40b.png icon in the post footer!
TeamSport90.com Grass Roots Football Forum
TeamSport90.com Football KitsComment
-
Comment
-
This code goes in combination with the SEO settings that enables Friendly URL's. You add the code that the thread creator created in your htaccess file located in the root of your forum files (if it isn't there, create one)Comment
-
I converted MattyAsia's .htaccess file to a web.config file that can be used for IIS 7 or higher and Microsoft's URL Rewrite module. However I have not had a chance to test it yet. You are welcome to test it.
Code:<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Imported Rule 1"> <match url="^includes/(.*)" ignoreCase="false" /> <action type="Rewrite" url="index.php" /> </rule> <rule name="Imported Rule 2"> <match url="^vb/(.*)" ignoreCase="false" /> <action type="Rewrite" url="index.php" /> </rule> <rule name="Imported Rule 3"> <match url="^packages/(.*)" ignoreCase="false" /> <action type="Rewrite" url="index.php" /> </rule> <rule name="Imported Rule 4"> <match url="^threads/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?))" ignoreCase="false" /> <action type="Rewrite" url="showthread.php?t={R:1}&page={R:2}&{QUERY_STRING}" appendQueryString="false" /> </rule> <rule name="Imported Rule 5"> <match url="^members/([0-9]+)" ignoreCase="false" /> <action type="Rewrite" url="member.php?u={R:1}&{QUERY_STRING}" appendQueryString="false" /> </rule> <rule name="Imported Rule 6"> <match url="^forums/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?))" ignoreCase="false" /> <action type="Rewrite" url="forumdisplay.php?f={R:1}&page={R:2}&{QUERY_STRING}" appendQueryString="false" /> </rule> <rule name="Imported Rule 7"> <match url="^blogs/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?))" ignoreCase="false" /> <action type="Rewrite" url="blog.php?u={R:1}&page={R:2}&{QUERY_STRING}" appendQueryString="false" /> </rule> <rule name="Imported Rule 8"> <match url="^entries/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?))" ignoreCase="false" /> <action type="Rewrite" url="entry.php?b={R:1}&page={R:2}&{QUERY_STRING}" appendQueryString="false" /> </rule> <rule name="Imported Rule 9"> <match url="^list/([^/]*/)([0-9]+)" ignoreCase="false" /> <action type="Rewrite" url="list.php?r={R:1}{R:2}&{QUERY_STRING}" appendQueryString="false" /> </rule> <rule name="Imported Rule 10"> <match url="^content/(.*)" ignoreCase="false" /> <action type="Rewrite" url="content.php?r={R:1}&{QUERY_STRING}" appendQueryString="false" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
Comment
Related Topics
Collapse
-
by Asad993Hello,
I was using vBulletin 4.4.2 on Mod Rewrite Friendly URLs with follwing rewrite .htaccess file.
HTML Code:# Author: Matty Asia # Version 1.4 # Downloaded from: http://www.vbulletin.com/forum/showthread.php?325798
-
Channel: Support Issues & Questions
-
-
by mnicholetAny docs or code for .htaccess to ensure Mod Rewrite Friendly URLs are functioning correctly? vb5 beta 11. Just using linux shared hosting with cpanel right now. Thank you.
Note: In order...-
Channel: Support Issues & Questions
-
Comment