Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 241 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I have struggled to get my rewrite rules to work the way I want them too

#1
This is going to be a lengthy post. Please bear with me.

> #My Directory Structure#

public_html
agentc0re
blog
forum
etc..
other doamins

> #My .htaccess files#

##public_html##

Options +FollowSymlinks +Includes +SymLinksIfOwnerMatch +ExecCGI -MultiViews -Indexes
<files .htaccess>
Order allow,deny
Deny from all
</files>

ErrorDocument 404 /agentc0re/404/index.html

<IfModule mod_rewrite.c>
RewriteEngine on

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.agentc0re.com$ [NC]
RewriteRule ^(.*)$

[To see links please register here]

$1 [R=301,L,NC]

RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.agentc0re.com$ [NC]
RewriteRule ^(.*)$

[To see links please register here]

$1 [R=301,L,NC]

RewriteCond %{HTTP_HOST} ^(

[To see links please register here]

$ [NC]
RewriteCond %{REQUEST_URI} !^/agentc0re/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /agentc0re/$1 [L]
RewriteCond %{HTTP_HOST} ^(

[To see links please register here]

$ [NC]
RewriteRule ^(/)?$ agentc0re/index.php [L]
</IfModule>

##agentc0re##

Options +FollowSymlinks +Includes +SymLinksIfOwnerMatch +ExecCGI -MultiViews -Indexes
<files .htaccess>
Order allow,deny
Deny from all
</files>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /agentc0re

RewriteRule ^Home/?$ /index.php?page= [L]
RewriteRule ^Blog/?$ /index.php?page=blog [L]
RewriteRule ^Forum/?$ /index.php?page=forum/index [L]
RewriteRule ^Sub_Counter/?$ /index.php?page=SubCounter/subCounter [L]
RewriteRule ^AboutMe/?$ /index.php?page=aboutme [L]
RewriteRule ^Contact/?$ /index.php?page=contact [L]

RewriteBase /agentc0re/forum

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>

##blog##

Options +FollowSymlinks +Includes +SymLinksIfOwnerMatch +ExecCGI -MultiViews -Indexes
<files .htaccess>
Order allow,deny
Deny from all
</files>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ../index.php?page=blog [L,NC]
</IfModule>

##forum##

Options +FollowSymlinks +Includes +SymLinksIfOwnerMatch +ExecCGI -MultiViews -Indexes
<files .htaccess>
Order allow,deny
Deny from all
</files>
#
# 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
RewriteBase /agentc0re/forum

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 application/javascript text/css text/html text/xml
</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>
> #What Does This Do#

###public_html###
redirects www version regardless of http(s) to the non www version of my website. Then it removes agentc0re from the URL.

###agentc0re###
I use dynamic php inclusion for my site. aka loading my header, content, footer all via php includes. Thats what the first set of rewrite rules do. They make the Menu bar on my site work...kinda (more info on that). The next set that has a rewrite base of "/agentc0re/forum" is there because if you were to view my site from

[To see links please register here]

(rewrite rule to my index.php include file) then the forum links don't work properly.

###blog###
This effectively loads the blog alongside my header+menu like the main page. without this, wordpress would just load by itself.

###forum###
Default rewrite rules for myBB

> #What needs to be fixed#

**Blog issues**

If you haven't figured it out by now [my webiste is this][1]. If you look at the menu links they look user friendly/nice. They also all go where they should. You can see this by hovering over them and looking at the bottom of your browser to see where they point to.

Now click on **Blog**. Well this is where shit gets weird. Now all the menu links have changed. They're Blog/Home, Blog/Blog...etc. **This is one item i need fixed**

Secondly, click on a link in my blog. NOW the damn menu links change even more. I assume this is related to the above problem. I have no clue why, but i know it's not wordpress related as it happens to my forum links as well. UNLESS they both do weird shit that causes this.

**Forum issues**

Similarly to the Blog, when you click on links within the forum, the links for the menu change. But initially clicking on Forum doesn't induce similar results like when you click on Blog.

> #What I'd Like to see happen#

**For blog**

When someone clicks on the Blog in the Menu and they navigate within the blog, links are show to be

[To see links please register here]

*
**For Forum**

Like the blog, I'd like the same thing to happen for the Forum.

[1]:

[To see links please register here]

Reply

#2
In your PHP file, the section:

<!-- language: lang-html -->

<div id='cssmenu' class='align-center'>
<ul>
<li><a href='Home'>Home</a>
</li>
<li><a href='Blog'>Blog</a>
</li>
<li><a href='Forum'>Forum</a>
</li>
<li><a href='#'>Youtube Resources</a>
<ul>
<!--<li><a href='index.php?page=/SubCounter/subCounter' target="_top">YTG Sub Counter</a></li>-->
<li><a href='Sub_Counter' target="_top">YTG Sub Counter</a>
</li>
</ul>
</li>
<li><a href='#'>Other Sites</a>
<ul>
<li><a href='http://extralifealerts.com' target='_blank'>Extra-Life Alerts</a>
</li>
<li><a href='http://learnix.net' target='_blank'>Learnix.net</a>
</li>
</ul>
</li>
<!--<li><a href='index.php?page=aboutme'>About Me</a></li>
<li><a href='index.php?page=contact'>Contact</a></li>-->
<li><a href='AboutMe'>About Me</a>
</li>
<li><a href='Contact'>Contact</a>
</li>
</ul>
</div>
needs to have absolute links, instead of relative ones. So, for eg. change the `a[href]`s to:

<li><a href='/Home'>Home</a>
</li>
<li><a href='/Blog'>Blog</a>
</li>
and that's all.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through