URL ModRewrite and Hotlink protection

Status
Not open for further replies.

rokkwarr

New Member
Messages
31
Reaction score
0
Points
0
Personally I think the Hotlink protection just screwed up all my modrewrites on every site I have with you guys, images wern't showing even though they were from the same site and the same page, when disabled every URL broke and I am now unable to access the administration panel on any of my sites that uses Modrewrite as a option, specifically http://the-continuum.co.cc/admin/
The other back-door to it is http://the-continuum.co.cc/index.php?action=admin
that is the non SEO link, but I can get to the admin page with that, however every other link on that page is broke. So is every other link on the forums. Is there any way to fix this issue? all my .htaccess files are correct and I think its got something to do with the hotlinking protection and what it did to my sites.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
all my .htaccess files are correct and I think its got something to do with the hotlinking protection and what it did to my sites.

Hotlink protection is done through the .htaccess file.

So, if you are sure your .htaccess files are correct, hotlink protection is not the issue.
 

rokkwarr

New Member
Messages
31
Reaction score
0
Points
0
actually now that you've said that, I think that the hotlink protection modified my .htaccess file breaking it and broke all the links in the process as well >.>

.htaccess file
# PRETTYURLS MOD BEGINS
# Pretty URLs mod
# http://code.google.com/p/prettyurls/
# .htaccess file generated automatically on: January 6, 2010, 10:43

RewriteBase /

# Rules for: yagam
RewriteRule ^announcements/([^/]+)/?$ ./index.php?action=announcements;aid=$1 [L,QSA]

# Rules for: profiles
RewriteRule ^profile/([^/]+)/?$ ./index.php?pretty;action=profile;user=$1 [L,QSA]

# Rules for: actions
RewriteRule ^(activate|admin|announcements|announcement|attachapprove|buddy|buddypage|calendar)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(clock|collapse|comment|coppa|credits|deletemsg|display|dlattach)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(editpoll|editpoll2|emailuser|findmember|forum|portal|groups|help)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(globalhf|helpadmin|im|jseditor|jsmodify|jsoption|lock|lockvoting)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(login|login2|logout|markasread|mergetopics|mlist|media|moderate)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(modifycat|modifykarma|movetopic|movetopic2|notify|notifyboard|openidreturn|pm)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(post|post2|printpage|profile|quotefast|quickmod|quickmod2|recent)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(register|register2|reminder|removepoll|removetopic2|reporttm|requestmembers|restoretopic)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(savepad|search|search2|sendtopic|smstats|suggest|spellcheck|splittopics)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(stats|sticky|switchsubaccount|staff|theme|trackip|about:mozilla|about:unknown)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(unread|unreadreplies|verificationcode|viewprofile|vote|viewquery|viewsmfile|who)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(\.xml|xmlhttp)/?$ ./index.php?pretty;action=$1 [L,QSA]

# Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]

# Rules for: topics
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]

# PRETTYURLS MOD ENDS
I've tried removing the .htaccess file as well to no avail.

Apparently theres a "cache" inside the SQL database that I am now clearing out, will keep updated
same thing when I deleted the cache.

Seems that the hotlinking bit did indeed mess up something with the .htaccess file causing my url modifier to fail with SMF.

However I found a solution and just in case anybody else has a SMF forum and happens to have the same issue, here is the code to disable PrettyURLs until you can re-enable it manually to reset itself.
<?php
require_once(dirname(__FILE__) . '/SSI.php');
updateSettings(array('pretty_enable_filters' => '0'));
?>

That goes into the root folder where your SSI.php file is at. you can name the php file whatever (not the ssi.php file however)
and then just open http://www.yoursite.com/whatever.php
This will shut off PrettyURLs for your SMF site long enough for you to get into the administration panel and fix the glitch that may of occured when toying with hotlinking.
 
Last edited:
Status
Not open for further replies.
Top