MyBB Community Forums

Full Version: Strange URL extension
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Weird, when I click the link, it doesn't show the index.php extension for me at all...
The GET data still shows up when I change themes, but when I just go to the website it doesn't show the index.php extension. If I type in my website with the extension, however, nothing changes except for the url.
(2017-01-13, 08:35 PM)Matt Wrote: [ -> ]
Quote:Edit: All right, restored all the index.html files (actually, did a complete reinstallation to make sure I didn't miss anything), and used this link to remove the index.php extension on the main page. https://community.mybb.com/thread-77141.html
My original problem still stands, though. :/

I'm not sure what problem that is now if the index.php issue has been fixed...

Matt
If you change theme here ( this forum ) it also shows the my_post_key= and alot of numbers.
https://community.mybb.com/index.php?my_...xxxxxxxxxx (all info after ?my_post_key= deleted )
When you go from MyBB Website to the --MyBB Website - fluid width or back again.
(2017-01-13, 10:33 PM)Sethera Wrote: [ -> ]Weird, when I click the link, it doesn't show the index.php extension for me at all...
The GET data still shows up when I change themes, but when I just go to the website it doesn't show the index.php extension. If I type in my website with the extension, however, nothing changes except for the url.

Yeah, if you go to it without the index.php, it will stay like that, but it doesn't seem the redirect is working - is it definitely in the .htaccess still?

(2017-01-13, 11:46 PM)johnnyvang Wrote: [ -> ]
(2017-01-13, 08:35 PM)Matt Wrote: [ -> ]
Quote:Edit: All right, restored all the index.html files (actually, did a complete reinstallation to make sure I didn't miss anything), and used this link to remove the index.php extension on the main page. https://community.mybb.com/thread-77141.html
My original problem still stands, though. :/

I'm not sure what problem that is now if the index.php issue has been fixed...

Matt
If you change theme here ( this forum ) it also shows the my_post_key= and alot of numbers.
https://community.mybb.com/index.php?my_...xxxxxxxxxx (all info after ?my_post_key= deleted )
When you go from MyBB Website to the --MyBB Website - fluid width or back again.

I'm aware of that, reason I asked was as it had been logged to Github and wasn't going to be fixed immediately so was just clarifying there wasn't an additional issue Smile
(2017-01-14, 10:55 AM)Matt Wrote: [ -> ]Yeah, if you go to it without the index.php, it will stay like that, but it doesn't seem the redirect is working - is it definitely in the .htaccess still?
Sorry for the late reply. And yes, if you mean the coding you gave me, then I put that in, though after checking, I think I embedded in it within another IfModule. Changed that so it's at the bottom of the file again but after checking myself it doesn't look like that change made a difference...I can copy the code for you to see though.
Options -MultiViews +FollowSymlinks -Indexes

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
#   MediaTemple, it is known to cause random Internal Server
#   errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
	# Turn off mod_security filtering.
	SecFilterEngine Off

	# The below probably isn't needed, but better safe than sorry.
	SecFilterScanPOST Off
</IfModule>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
#   the setting enabled in the Admin CP and you have this file
#   named .htaccess
#
<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
	RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

	RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
	RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
	RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
	RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
	RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
	RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
	RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

	RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

	RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

	RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

	RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

	RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]

	<IfModule mod_env.c>
		SetEnv SEO_SUPPORT 1
	</IfModule>
</IfModule>

#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE text/css text/html application/xhtml+xml text/xml application/xml text/plain text/x-component application/javascript application/x-javascript application/rss+xml application/atom+xml application/json application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject application/font-sfnt application/font-woff application/font-woff2 image/svg+xml image/x-icon
</IfModule>

DirectoryIndex index.php

<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} ^/index.php
RewriteRule $ / [R=301,L]
</IfModule>

# Note: You are able to choose a different name in the Admin CP. If you've done that you need to change it here too
<Files "error.log">
	Order Deny,Allow
	Deny from all
</Files>
I had removed the lines from this page though, but after reinserting them, it didn't make a difference.

So the problem of the GET data isn't just on my forum...that's both a relief and a bit concerning, though at least it's not doing any major harm.
If you take it out of the if statement, does it error? I.e. if you change:

<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} ^/index.php
RewriteRule $ / [R=301,L]
</IfModule>

to just:

RewriteCond %{REQUEST_URI} ^/index.php
RewriteRule $ / [R=301,L]

Does this give you a 500 internal server error? Wondering if mod_rewrite is even available.
I took out the IfModule lines and there was no change. Both when accessing the website and when changing themes. *shrugs*
Pages: 1 2