Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-25-2013, 10:03 AM
Disco_Dave's Avatar
Disco_Dave Disco_Dave is offline
 
Join Date: May 2011
Location: Belfast
Posts: 586
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Friendly URL'S

Hi

I turned this option on in our ACP And now all our forums go to a 404, is there something I'm doing wrong? or do you need to run something else to make this work.

Dave
Reply With Quote
  #2  
Old 11-25-2013, 11:05 AM
Krusty1231's Avatar
Krusty1231 Krusty1231 is offline
 
Join Date: Jul 2010
Location: Canada
Posts: 366
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is your htaccess set correctly? If I remember right there is an htaccess in the do not upload folder of vbulletin for this.....I might be wrong.

Final_Koss helped me with mine.

Just trying to shove you in some direction.....lol.

Good luck.
Reply With Quote
  #3  
Old 11-25-2013, 11:37 AM
Disco_Dave's Avatar
Disco_Dave Disco_Dave is offline
 
Join Date: May 2011
Location: Belfast
Posts: 586
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cheers Krusty, That's what I'm working on now, still getting 404's.......I'm not doing something right
Reply With Quote
  #4  
Old 11-25-2013, 06:25 PM
AndrewSimm AndrewSimm is offline
 
Join Date: Sep 2006
Location: Atlanta, GA
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

copy and paste your .htaccess file here
Reply With Quote
  #5  
Old 11-25-2013, 08:05 PM
Disco_Dave's Avatar
Disco_Dave Disco_Dave is offline
 
Join Date: May 2011
Location: Belfast
Posts: 586
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been working on, final kaoss's article.... Not sure I fully understand it all, but it has speeded up the forum homepage sum what. Just can't get the url's to work on this: Mod Rewrite Friendly URLs all forums redirect to 404 pages, I don't fully understand what it does. Any help would be great


PHP Code:
RewriteEngine on

# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your vBulletin directory.
# RewriteBase /forum/

# If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.
# Options -MultiViews

RewriteCond %{REQUEST_FILENAME} -[OR]
RewriteCond %{REQUEST_FILENAME} -[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} -[OR]
RewriteCond %{REQUEST_FILENAME} -[OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule 
^.*$ - [NC,L]

# MVC
RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$[QSA]

# Check MVC result
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule 
^(.*)$ - [NC,L]
RewriteRule ^(.*)$ - [R=404,L]

#Deny attempts to view the Htaccess file.
<Files .htaccess>
Order allow,deny
Deny from all
</Files>


# BEGIN W3TC Browser Cache
<IfModule mod_mime.c>
    
AddType text/css .css
    AddType application
/javascript .js
    AddType application
/x-javascript .js
    AddType text
/html .html .htm
    AddType text
/richtext .rtf .rtx
    AddType image
/svg+xml .svg .svgz
    AddType text
/plain .txt
    AddType text
/xsd .xsd
    AddType text
/xsl .xsl
    AddType text
/xml .xml
    AddType video
/asf .asf .asx .wax .wmv .wmx
    AddType video
/avi .avi
    AddType image
/bmp .bmp
    AddType application
/java .class
    
AddType video/divx .divx
    AddType application
/msword .doc .docx
    AddType application
/x-msdownload .exe
    AddType image
/gif .gif
    AddType application
/x-gzip .gz .gzip
    AddType image
/x-icon .ico
    AddType image
/jpeg .jpg .jpeg .jpe
    AddType application
/vnd.ms-access .mdb
    AddType audio
/midi .mid .midi
    AddType video
/quicktime .mov .qt
    AddType audio
/mpeg .mp3 .m4a
    AddType video
/mp4 .mp4 .m4v
    AddType video
/mpeg .mpeg .mpg .mpe
    AddType application
/vnd.ms-project .mpp
    AddType application
/vnd.oasis.opendocument.database .odb
    AddType application
/vnd.oasis.opendocument.chart .odc
    AddType application
/vnd.oasis.opendocument.formula .odf
    AddType application
/vnd.oasis.opendocument.graphics .odg
    AddType application
/vnd.oasis.opendocument.presentation .odp
    AddType application
/vnd.oasis.opendocument.spreadsheet .ods
    AddType application
/vnd.oasis.opendocument.text .odt
    AddType audio
/ogg .ogg
    AddType application
/pdf .pdf
    AddType image
/png .png
    AddType application
/vnd.ms-powerpoint .pot .pps .ppt .pptx
    AddType audio
/x-realaudio .ra .ram
    AddType application
/x-shockwave-flash .swf
    AddType application
/x-tar .tar
    AddType image
/tiff .tif .tiff
    AddType audio
/wav .wav
    AddType audio
/wma .wma
    AddType application
/vnd.ms-write .wri
    AddType application
/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
    AddType application
/zip .zip
</IfModule>
<
IfModule mod_expires.c>
    
ExpiresActive On
    ExpiresByType text
/css A31536000
    ExpiresByType application
/x-javascript A31536000
    ExpiresByType text
/html A3600
    ExpiresByType text
/richtext A3600
    ExpiresByType image
/svg+xml A3600
    ExpiresByType text
/plain A3600
    ExpiresByType text
/xsd A3600
    ExpiresByType text
/xsl A3600
    ExpiresByType text
/xml A3600
    ExpiresByType video
/asf A31536000
    ExpiresByType video
/avi A31536000
    ExpiresByType image
/bmp A31536000
    ExpiresByType application
/java A31536000
    ExpiresByType video
/divx A31536000
    ExpiresByType application
/msword A31536000
    ExpiresByType application
/x-msdownload A31536000
    ExpiresByType image
/gif A31536000
    ExpiresByType application
/x-gzip A31536000
    ExpiresByType image
/x-icon A31536000
    ExpiresByType image
/jpeg A31536000
    ExpiresByType application
/vnd.ms-access A31536000
    ExpiresByType audio
/midi A31536000
    ExpiresByType video
/quicktime A31536000
    ExpiresByType audio
/mpeg A31536000
    ExpiresByType video
/mp4 A31536000
    ExpiresByType video
/mpeg A31536000
    ExpiresByType application
/vnd.ms-project A31536000
    ExpiresByType application
/vnd.oasis.opendocument.database A31536000
    ExpiresByType application
/vnd.oasis.opendocument.chart A31536000
    ExpiresByType application
/vnd.oasis.opendocument.formula A31536000
    ExpiresByType application
/vnd.oasis.opendocument.graphics A31536000
    ExpiresByType application
/vnd.oasis.opendocument.presentation A31536000
    ExpiresByType application
/vnd.oasis.opendocument.spreadsheet A31536000
    ExpiresByType application
/vnd.oasis.opendocument.text A31536000
    ExpiresByType audio
/ogg A31536000
    ExpiresByType application
/pdf A31536000
    ExpiresByType image
/png A31536000
    ExpiresByType application
/vnd.ms-powerpoint A31536000
    ExpiresByType audio
/x-realaudio A31536000
    ExpiresByType application
/x-shockwave-flash A31536000
    ExpiresByType application
/x-tar A31536000
    ExpiresByType image
/tiff A31536000
    ExpiresByType audio
/wav A31536000
    ExpiresByType audio
/wma A31536000
    ExpiresByType application
/vnd.ms-write A31536000
    ExpiresByType application
/vnd.ms-excel A31536000
    ExpiresByType application
/zip A31536000
</IfModule>


# BEGIN Compress text files
<ifModule mod_deflate.c>
  
AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
  AddOutputFilterByType DEFLATE image
/svg+xml application/xhtml+xml application/xml
  AddOutputFilterByType DEFLATE application
/rdf+xml application/rss+xml application/atom+xml
  AddOutputFilterByType DEFLATE text
/javascript application/javascript application/x-javascript application/json
  AddOutputFilterByType DEFLATE application
/x-font-ttf application/x-font-otf
  AddOutputFilterByType DEFLATE font
/truetype font/opentype


  BrowserMatch 
^Mozilla/4 gzip-only-text/html
BrowserMatch 
^Mozilla/4\.0[678no-gzip
BrowserMatch 
\bMSIE !no-gzip !gzip-only-text/html
</ifModule>
# END Compress text files
 
 
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
  <
filesMatch "\.(ico|jpe?g|png|gif|swf)$">
    
Header set Cache-Control "public"
  
</filesMatch>
  <
filesMatch "\.(css)$">
    
Header set Cache-Control "public"
  
</filesMatch>
  <
filesMatch "\.(js)$">
    
Header set Cache-Control "private"
  
</filesMatch>
  <
filesMatch "\.(x?html?|php)$">
    
Header set Cache-Control "private, must-revalidate"
  
</filesMatch>
</
ifModule>
# END Cache-Control Headers
 
# BEGIN Turn ETags Off
FileETag None
# END Turn ETags Off




# proc/self/environ? no way!
RewriteCond %{QUERY_STRINGproc/self/environ [OR]
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRINGmosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRINGbase64_encode.*(.*) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRINGGLOBALS(=|[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING_REQUEST(=|[|\%[0-9A-Z]{0,2})

##
##&nbsp; Commented version of Rewrite rules attributed to Ronald van den Heetkamp
##&nbsp; Comments by http://bodvoc.com
#
# Prevent use of specified methods in HTTP Request
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC,OR]
# Block out use of illegal or unsafe characters in the HTTP Request
RewriteCond %{THE_REQUEST} ^.*(\\r|\\n|%0A|%0D).* [NC,OR]
# Block out use of illegal or unsafe characters in the Referer Variable of the HTTP Request
RewriteCond %{HTTP_REFERER} ^(.*)(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Block out use of illegal or unsafe characters in any cookie associated with the HTTP Request
RewriteCond %{HTTP_COOKIE} ^.*(<|>|'
|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Block out use of illegal characters in URI or use of malformed URI
RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|">|"<|/|\\\.\.\\).{0,9999}.* [NC,OR]
# NOTE - disable this rule if your site is integrated with Payment Gateways such as PayPal 
# Block out  use of empty User Agent Strings
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
# Block out  use of User Agent Strings beginning with java, curl or wget
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget).* [NC,OR]
# Block out  use of User Agent Strings containing specific robot (crawler) identifiers
RewriteCond %{HTTP_USER_AGENT} ^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).* [NC,OR]
# Block out  use of User Agent Strings containing references to specific crawler libraries
RewriteCond %{HTTP_USER_AGENT} ^.*(libwww-perl|curl|wget|python|nikto|scan).* [NC,OR]
# Block out  use of illegal or unsafe characters in the User Agent variable
RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Measures to block out  SQL injection attacks
RewriteCond %{QUERY_STRING} ^.*(;|<|>|'
|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|update|md5|benchmark).* [NC,OR]
# Block out  reference to localhost/loopback/127.0.0.1 in the Query String
RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* [NC,OR]
# Block out  use of illegal or unsafe characters in the Query String variable
RewriteCond %{QUERY_STRING} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC]
#
## End of commented Rewrite directives
#


RewriteEngine on

# force ssl
RewriteCond     %{SERVER_PORT} ^80$
RewriteRule     ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

RewriteEngine on

# Google Analytics Integration - Added by cPanel.
<IfModule mod_substitute.c>
AddOutputFilterByType SUBSTITUTE text/html
Substitute "
s|(<script src='/google_analytics_auto.js'></script>)?</head>|<script src='/google_analytics_auto.js'></script></head>|i"
</IfModule>

RewriteCond %{HTTPS_HOST} ^nirc\.co\.uk$ [OR]
RewriteCond %{HTTPS_HOST} ^www\.nirc\.co\.uk$
RewriteRule ^/?$ "
https\:\/\/www\.nirc\.co\.uk\/index\.php" [R=301,L]

<IfModule mod_suphp.c>
 suPHP_ConfigPath /home/nirc
 <Files php.ini>
   order allow,deny
   deny from all
 </Files> 
Dave
Reply With Quote
  #6  
Old 11-26-2013, 01:55 AM
pityocamptes's Avatar
pityocamptes pityocamptes is offline
 
Join Date: Apr 2010
Posts: 595
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is how I did mine, they had to be the first thing in the file, I had the same issue...

Code:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} !^www.XXXXXXXXXXXXXXXX.com$ [NC]
RewriteRule ^(.*)$ https://www.XXXXXXXXXXXXXX.com/$1 [R=301,L]

RewriteEngine on
RewriteBase /

RewriteCond %{SERVER_PORT} !443
RewriteRule (.*) https://www.XXXXXXXXXXXXXX.com [R=301,L]

# This file is only needed if you have set the Forum Component URL in your admincp and you are 
# using the mod_rewrite option for friendly urls.  If this is the case, copy this file
# to your forum component stub directory.

# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your forum component directory.
# RewriteBase /forum-stub-directory/

# If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.

Options -MultiViews

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]

# FeedBurner
RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC]
Reply With Quote
  #7  
Old 11-26-2013, 07:23 AM
Disco_Dave's Avatar
Disco_Dave Disco_Dave is offline
 
Join Date: May 2011
Location: Belfast
Posts: 586
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for sharing, but this is also stopping me from accessing the my ACP
Reply With Quote
  #8  
Old 11-26-2013, 11:12 AM
ramesh_umk3 ramesh_umk3 is offline
 
Join Date: Jul 2010
Location: Earth
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

goto your config.php file and allocate new location for admincp and rename your admincp folder accordingly
Reply With Quote
  #9  
Old 11-26-2013, 11:24 AM
Disco_Dave's Avatar
Disco_Dave Disco_Dave is offline
 
Join Date: May 2011
Location: Belfast
Posts: 586
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ramesh_umk3 View Post
goto your config.php file and allocate new location for admincp and rename your admincp folder accordingly
Hi

My admin cp is already renamed in the config.php before I turned on the Mod Rewrite Friendly URLs
Reply With Quote
  #10  
Old 11-26-2013, 07:28 PM
pityocamptes's Avatar
pityocamptes pityocamptes is offline
 
Join Date: Apr 2010
Posts: 595
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What error do you get? One option is to comment out lines or blocks of your htaccess and see if you can get access. After that uncomment out the blocks/lines and narrow it down to which line throws the error...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:46 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04188 seconds
  • Memory Usage 2,362KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete