Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
ricktido
Worker
Worker



Joined: Nov 09, 2012
Posts: 127

PostPosted: Mon Jan 13, 2014 9:19 am Reply with quote

So, I contacted my web host, they provided no answer. Same at the DragonflyCMS website. So, I thought I'd ask here, maybe someone can help me. My rewrites do not work. Only some of the URLs work. Others just 404. I have examples below.

My .htaccess:

Code:
# CPG Dragonfly CMS

# Copyright (c) 2004-2006 by CPG-Nuke Dev Team, dragonflycms.org
# Released under the GNU GPL version 2 or any later version

# Remove the pound sign on these 3 for production sites
# if your server doesn't allow it then a Error 500 is given
# php_flag display_errors off
# php_value error_reporting 0
# php_flag register_globals 0

# flood protection

# deny most common except .php
<FilesMatch "\.(inc|tpl|h|ihtml|sql|ini|conf|bin|spd|theme|module)$">
  deny from all
</FilesMatch>

# disable access to config.php and .ht* from a browser
<FilesMatch "^(config\.php|\.ht)">
Deny from all
</FilesMatch>
<FilesMatch "error\.(php|gif)">
allow from all
</FilesMatch>

# if you use LEO, mod_rewrite is necessary
<IfModule mod_rewrite.c>
  RewriteEngine On

  # Check for Santy Worms and redirect them to a fail page
  #-------------------------------------------------------------------
  # Variant -1
  # uncomment if you dont use LWP
  # RewriteCond %{HTTP_USER_AGENT} ^LWP    [NC,OR]
  RewriteCond %{HTTP_USER_AGENT} Baidu    [NC,OR]
  # Variant -2
  RewriteCond %{REQUEST_URI} ^visualcoders [NC,OR]
  # Variant -3
  RewriteCond %{QUERY_STRING} rush=([^&]+) [NC,OR]
  # Variant -4
  RewriteCond %{HTTP:x-moz} ^prefetch [NC,OR]
  RewriteCond %{X-moz} ^prefetch [NC,OR]
  # block local file, sql and remote attacks
  RewriteCond %{QUERY_STRING} \=../        [NC,OR]
  RewriteCond %{QUERY_STRING} "%20UNION"  [NC,OR]
  RewriteCond %{QUERY_STRING} \=http://    [NC]
  # deny them
  RewriteRule ^.*$ - [F]
  #-------------------------------------------------------------------

  RewriteCond %{REQUEST_FILENAME} -f [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^(.*)$ - [L]

  # if you use LEO and CPG-Nuke is installed in a sub-directory like '/html',
  # remove that # before RewriteBase and rename /html to the path of the sub-directory
  RewriteBase /
  # RewriteRule ^index\.html /index.php
  RewriteRule ^([a-zA-Z0-9_=+-]+)(/|\.html)$ index=$1 [L,S=5]
  RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)(/|\.html)$ index=$1&file=$2 [L,S=4]
  RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ index=$1&file=$2 [L,S=3]
  RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(.*)(/|\.html)$ index=$1&file=$2&$3 [L,S=1]
  RewriteRule ^([a-zA-Z0-9_]+)/(.*)(/|\.html)$ index=$1&file=index&$2  [L]
  RewriteRule ^index=(.*[^/])/(.*) index=$1&$2 [N,L]
  RewriteRule ^index=(.*) index.php?name=$1 [L]
</IfModule>

# use custom error pages if you wish
ErrorDocument 400 /error.php
ErrorDocument 401 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
ErrorDocument 500 /error.php

# disallow index viewing (like ftp) of directory
# Remove # for production sites
# Options -Indexes

# for hosts that don't allow the above, we won't give people anything to look at
<IfModule mod_autoindex.c>
IndexIgnore *
</IfModule>

AddDefaultCharset utf-8


Some of the URLs work, some give 404 errors. It's a fresh installation, nothing was changed except some forums added. Example of some non-working URLs:
Code:


http://site.com/Your_Account/profile=Admin.html

http://site.com/News/topic=1.html

http://site.com/Your_Account/edit=reg_details.html

http://site.com/Your_Account/edit=avatar.html

http://site.com/Private_Messages/mode=post.html

http://site.com/Forums/posting/mode=editpost/p=1.html

http://site.com/Forums/posting/mode=quote/p=1.html

examples of WORKING URLs:
Code:


http://site.com/Private_Messages.html

http://site.com/Forums/viewtopic/t=1.html

http://site.com/News/article/sid=2.html

http://site.com/Forums/archives.html


I use x10hosting.com
mod_rewrite works and Apache
 
View user's profile Send private message
djmaze
Subject Matter Expert



Joined: May 15, 2004
Posts: 727
Location: http://tinyurl.com/5z8dmv

PostPosted: Tue Jan 14, 2014 5:01 am Reply with quote

[ Only registered users can see links on this board! Get registered or login! ]

You didn't bump your question, so it probably slipped attention

_________________
$ mount /dev/spoon /eat/fun auto,overclock 0 1
ERROR: there is no spoon [ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
duck
Involved
Involved



Joined: Jul 03, 2006
Posts: 273

PostPosted: Wed Jan 15, 2014 6:23 am Reply with quote

First thing I notice wrong is you have equal sign in the urls after rewrite. Your parameters need separation by either slashes or dashes.
 
View user's profile Send private message
ricktido







PostPosted: Wed Jan 15, 2014 12:26 pm Reply with quote

duck wrote:
First thing I notice wrong is you have equal sign in the urls after rewrite. Your parameters need separation by either slashes or dashes.


I'm using the default .htaccess that came with Dragonfly. And they use the same URLs on their website.. With the equals sign and all that........
[ Only registered users can see links on this board! Get registered or login! ]


The registration URL doesn't work for me, but it works here: [ Only registered users can see links on this board! Get registered or login! ]
Same with many other URLs, but post and forum URLs seem to work.. And THEY have slashes and equal signs.


Here is a link to my site: [ Only registered users can see links on this board! Get registered or login! ]


Last edited by ricktido on Wed Jan 15, 2014 5:35 pm; edited 1 time in total 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6433

PostPosted: Wed Jan 15, 2014 4:35 pm Reply with quote

ricktido, I'm sure you're frustrated, but please be careful with generalizations, especially those directed at individuals. This isn't a support site for dragonflycms, but people are willing to assist if they can. Like duck, I questioned the = sign in the rewrite until I reviewed the htacess and realized how different it is from the Shortlinks approach used for RavenCMS.

It would be helpful to know what the URL is without rewriting. Can you rename the .htaccess and provide one or more of the URLs that aren't working?

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
kguske







PostPosted: Wed Jan 15, 2014 4:41 pm Reply with quote

Also, have you tried uncommenting
Code:
# php_flag register_globals 0

Just a thought as I am unfamiliar with the details of DragonflyCMS - and curious to see if that has any impact.
 
kguske







PostPosted: Wed Jan 15, 2014 5:06 pm Reply with quote

Hmmm... this link works: [ Only registered users can see links on this board! Get registered or login! ]

Did you retest after going into My Profile Information on the site and completing:

Home Page (= your website address)
OS/Apache/MySQL/PHP/DragonflyCMS versions
[ Only registered users can see links on this board! Get registered or login! ] doesn't work, but I couldn't find any links on the site to that. Even this: [ Only registered users can see links on this board! Get registered or login! ] has a link to [ Only registered users can see links on this board! Get registered or login! ]

Is there a higher level htaccess that might be overriding that? Your host might know. Since it's free hosting, I wonder if a higher level htaccess might interfere with rewrites that have =. If not that, maybe it's the version of Apache and / or mod_rewrite.

Also, I found these interesting:
[ Only registered users can see links on this board! Get registered or login! ] (3 years ago, issues with mod_rewrite on X10 apache servers) [ Only registered users can see links on this board! Get registered or login! ] (2 years ago, a reference to X10 servers running Lightspeed, not Apache, with a Lightspeed equivalent of mod_rewrite) [ Only registered users can see links on this board! Get registered or login! ] (2 days ago, someone named Tazmanian, aka Alex, with the exact same problem Smile )
 
ricktido







PostPosted: Wed Jan 15, 2014 5:31 pm Reply with quote

kguske wrote:
[ Only registered users can see links on this board! Get registered or login! ] (2 years ago, a reference to X10 servers running Lightspeed, not Apache, with a Lightspeed equivalent of mod_rewrite) [ Only registered users can see links on this board! Get registered or login! ] (2 days ago, someone named Tazmanian, aka Alex, with the exact same problem Smile )

Haha exact same problem because that is me from TAZ xD

There is no higher level htaccess and the script is installed on the root, where the htaccess is.
I'm temporarily on free hosting because I am setting up the website before I replace my existing MyBB site with it [ Haxorz.net ]
I was told that it is not an issue with the webhost, but it may be.
 
kguske







PostPosted: Wed Jan 15, 2014 6:30 pm Reply with quote

Sorry, it's litespeed not lightspeed...

It appears they are using it: [ Only registered users can see links on this board! Get registered or login! ]

I signed up for a free account, and it shows Apache 2.2.25 on the cPanel. But, the default 404 page shows..."Proudly Served by LiteSpeed Web Server" (More info: [ Only registered users can see links on this board! Get registered or login! ]

Here's an interesting post that *might* be useful: [ Only registered users can see links on this board! Get registered or login! ]

Note the last post re: adding /? to the rules...

Assuming mod_rewrite incompatibility between apache and litespeed is the issue, this has been a useful exercise in that we identified a new webserver that people might use that might not be consistent with Apache in every case. And, since X10 offers free hosting, we can use that to test RavenCMS for compatibility...
 
ricktido







PostPosted: Thu Jan 16, 2014 12:02 am Reply with quote

djmaze, a big problem with your script:

Does it bother anyone that their theme can be ripped / templates viewed very easily?

Example... [ Only registered users can see links on this board! Get registered or login! ]

Solution..
Add a .htaccess file to every directory under themes/{your_theme}/templates/
containing this:

Code:
order deny allow 

deny from all


This still allows the template to be loaded, yet prevents direct access..

kguske, thanks for your help, it's probably a host issue I guess
 
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1122

PostPosted: Thu Jan 16, 2014 8:20 am Reply with quote

I think this theme has some validation errors.

1. line 41 column 7 - Warning: <div> isn't allowed in <tr> elements
2. line 41 column 3 - Info: <tr> previously mentioned

it is coming from this part.


Code:
<table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>
      <td class="hdr01"></td>
      <td class="hdr02"><a href="/"><img src="images/logo.gif" style="border:0;" alt="Forums" title="Forums" /></a></td>
      <td class="hdr03" align="center"></td>
 
    </tr>
  <tr><div class="headmenu">
<div id='cssmenu'>
<ul>
   <li class='active'><a href='/'><span>Home</span></a></li>
   <li><a href='/Forums.html'><span>Forums</span></a></li>
   <li><a href='/Downloads.html'><span>Downloads</span></a></li>
   <li class='has-sub'><a style="cursor: pointer;"><span>News</span></a>
      <ul>
   <li class='last'><a href='/Topics.html'><span>Topics</span></a></li>
   <li class='last'><a href='/Stories_Archive.html'><span>Stories Archive</span></a></li>
      </ul>
   </li>

   <li class='has-sub'><a style="cursor: pointer;"><span>Login / Register</span></a>
      <ul>
   <li class='last'><a href='/Your_Account.html'><span>Login</span></a></li>
   <li class='last'><a href='/Your_Account/register.html'><span>Register</span></a></li>
      </ul>

   <li class='has-sub'><a style="cursor: pointer;"><span>Extra Links</span></a>
      <ul>
   <li class='last'><a href='/Forums/archives.html'><span>Forum Archives</span></a></li>
   <li class='last'><a href='/Forums/search.html'><span>Search</span></a></li>
   <li class='last'><a href='/Members_List.html'><span>Members List</span></a></li>
   <li class='last'><a href='/Forums/faq.html'><span>FAQ</span></a></li>
      </ul>
       </li>
</ul>
</div></div>
  </td>
</table>
 
View user's profile Send private message
djmaze







PostPosted: Thu Jan 16, 2014 9:58 am Reply with quote

ricktido wrote:
djmaze, a big problem with your script:

Does it bother anyone that their theme can be ripped / templates viewed very easily?

Example... [ Only registered users can see links on this board! Get registered or login! ]


None seem to be bothered, and if they do, they should add a deny rule Wink
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©