Wayne would that go into the .htaccess file?
Announcement
Collapse
No announcement yet.
Mod Rewrite Friendly URLs => .htaccess
Collapse
This topic is closed.
X
X
-
Originally posted by Charlie_Brown View PostWayne would that go into the .htaccess file?Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 API
Comment
-
Code:# Author: Matty Asia # Version 1.4 # Downloaded from: http://www.vbulletin.com/forum/showthread.php?325798 RewriteEngine On ### THIS IS A LITTLE EXTRA SECURITY AND CAN BE REMOVED RewriteRule ^includes/(.*) index.php RewriteRule ^vb/(.*) index.php RewriteRule ^packages/(.*) index.php ### THIS IS THE ACTUAL REWRITE [COLOR=Red] RewriteRule ^threads/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) showthread.php?t=$1&page=$2&%{QUERY_STRING}[/COLOR] RewriteRule ^members/([0-9]+) member.php?u=$1&%{QUERY_STRING} [COLOR=Red]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}[/COLOR] RewriteRule ^list/([^/]*/)([0-9]+) list.php?r=$1$2&%{QUERY_STRING} RewriteRule ^content/(.*) content.php?r=$1&%{QUERY_STRING}
i searched and this works for me now:
Code:RewriteEngine On RewriteRule ^members/([0-9]+) member.php?u=$1&%{QUERY_STRING} RewriteRule ^list/([^/]*/)([0-9]+) list.php?r=$1$2&%{QUERY_STRING} RewriteRule ^content/(.*) content.php?r=$1&%{QUERY_STRING} RewriteRule ^threads/([0-9]+)-(.*)? showthread.php?t=$1 [QSA,L] RewriteRule ^members/([0-9]+)-(.*)? member.php?u=$1 [QSA,L] RewriteRule ^forums/([0-9]+)-(.*)? forumdisplay.php?f=$1 [QSA,L]
Last edited by NavS; Mon 16 Nov '09, 5:08pm.
Comment
-
Originally posted by NavS View PostCode:# Author: Matty Asia # Version 1.4 # Downloaded from: http://www.vbulletin.com/forum/showthread.php?325798 RewriteEngine On ### THIS IS A LITTLE EXTRA SECURITY AND CAN BE REMOVED RewriteRule ^includes/(.*) index.php RewriteRule ^vb/(.*) index.php RewriteRule ^packages/(.*) index.php ### THIS IS THE ACTUAL REWRITE [COLOR=Red] RewriteRule ^threads/([0-9]+)(?:/?$|(?:-[^/]+))(?:/?$|(?:/page([0-9]+)?)) showthread.php?t=$1&page=$2&%{QUERY_STRING}[/COLOR] RewriteRule ^members/([0-9]+) member.php?u=$1&%{QUERY_STRING} [COLOR=Red]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}[/COLOR] RewriteRule ^list/([^/]*/)([0-9]+) list.php?r=$1$2&%{QUERY_STRING} RewriteRule ^content/(.*) content.php?r=$1&%{QUERY_STRING}
i searched and this works for me now:
Code:RewriteEngine On RewriteRule ^members/([0-9]+) member.php?u=$1&%{QUERY_STRING} RewriteRule ^list/([^/]*/)([0-9]+) list.php?r=$1$2&%{QUERY_STRING} RewriteRule ^content/(.*) content.php?r=$1&%{QUERY_STRING} RewriteRule ^threads/([0-9]+)-(.*)? showthread.php?t=$1 [QSA,L] RewriteRule ^members/([0-9]+)-(.*)? member.php?u=$1 [QSA,L] RewriteRule ^forums/([0-9]+)-(.*)? forumdisplay.php?f=$1 [QSA,L]
snerd
Comment
-
Curious. I noticed that the mod rewrite rules adds a /thread/ before the link, eg
Is it possible it can be changed to something like this?
http://forum.mysite.com/my-post-is-awesome-t6379.html
I like that one much better.
EDIT!
At the post creator. Using that mod rewrite rules makes you unable to create front page articles. It brings you back to the front page with the link of creating a new article.Last edited by Skyrider; Tue 17 Nov '09, 6:14am.
Comment
-
-
-
Originally posted by Alfa1 View PostOriginally posted by Pehchaan View Postalso I need this:
http://www.site.com/albums/album-name
But vBulletin would still not actually link to it at all.
Comment
-
Originally posted by FF|Skyrider View PostCurious. I noticed that the mod rewrite rules adds a /thread/ before the link, eg
Is it possible it can be changed to something like this?
http://forum.mysite.com/my-post-is-awesome-t6379.html
I like that one much better.
Originally posted by FF|Skyrider View PostEDIT!
At the post creator. Using that mod rewrite rules makes you unable to create front page articles. It brings you back to the front page with the link of creating a new article.
Comment
-
Worked perfect.
Originally posted by MattyAsia View PostThere is no .htaccess to support the "Mod Rewrite Friendly URLs", so I have one written below, the first 3 are just a little beta bug proofing.
I can not guarantee this is perfect, but it's working so far, if I find any bugs, I'll squish em and edit in an updated version
Code:# Author: Matty Asia # Version 1.4 # Downloaded from: http://www.vbulletin.com/forum/showthread.php?325798 RewriteEngine On ### THIS IS A LITTLE EXTRA SECURITY AND CAN BE REMOVED RewriteRule ^includes/(.*) index.php RewriteRule ^vb/(.*) index.php RewriteRule ^packages/(.*) index.php ### THIS IS THE ACTUAL REWRITE 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}
To do this...
You need to go to Admin Control Panel then Settings > Options
Server Settings and Optimization Options
Then select Mod Rewrite Friendly URLs in the Friendly URLs section.
UPDATES:
1.4 Fixed content editing for CMS sections without SEO friendly names
If you get Error 500, check the .htaccess file for any \n hidden anywhere as seems to have appeared for a number of users copying from here, see the quote just below. Make sure what you copy is identical to what you see above.
Comment
-
You can add one more rule. This rule is for the 'Configure' link into the widget manager (admincp).
Code:RewriteRule ^widget/config/([0-9]+) widget.php?r=config/$1&%{QUERY_STRING}
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
Wed 3 Sep '14, 4:07am -
-
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
Sun 30 Sep '12, 8:13pm -
Comment