Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- htaccess rewrite help


spunkle - 9:25 am on Feb 4, 2011 (gmt 0)


Hey,

I have fixed those typos, my mistake. I have tested the new htaccess and the trouble url's are still accessable. really appreciate your help with this.

this is a problem url:
example.com/?m=h&page=4/page1077/page5/page1116/page10/page1129/page7/page7

should be:
example.com/top_rated/page4

here is the newest htaccess:


mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

#Prevent timeouts during upload (May require editing of php.ini)
php_value upload_max_filesize 800M
php_value post_max_size 800M
php_value max_execution_time 1600
php_value max_input_time 1600
php_value register_globals 0
ErrorDocument 404 /404.php


RewriteEngine on



#Moved Codes
RewriteRule ^category/$ http://www.example.com/category [R=301,L]
RewriteRule ^tag/$ http://www.example.com/tags [R=301,L]
RewriteRule ^popular_tags/$ http://www.example.com/popular_tags [R=301,L]
RewriteRule ^webmasters/$ http://www.example.com/about [R=301,L]
RewriteRule ^contact/$ http://www.example.com/about [R=301,L]
RewriteRule ^about/$ http://www.example.com/about [R=301,L]
RewriteRule ^subscriptions/$ http://www.example.com/subscriptions [R=301,L]
RewriteRule ^favorites/$ http://www.example.com/favorites [R=301,L]
RewriteRule ^disabled/$ http://www.example.com/disabled [R=301,L]
RewriteRule ^search-stats/$ http://www.example.com/search-stats [R=301,L]
RewriteRule ^channel-editor/$ http://www.example.com/channel-editor [R=301,L]
RewriteRule ^seo-tools/$ http://www.example.com/seo-tools [R=301,L]
RewriteRule ^title-editor/$ http://www.example.com/title-editor [R=301,L]
RewriteRule ^import-failed/$ http://www.example.com/import-failed [R=301,L]
RewriteRule ^import-queued/$ http://www.example.com/import-queued [R=301,L]
RewriteRule ^queued/$ http://www.example.com/queued [R=301,L]
RewriteRule ^most_recent/$ http://www.example.com/new [R=301,L]
RewriteRule ^most_viewed/$ http://www.example.com/most_viewed [R=301,L]
RewriteRule ^most_discussed/$ http://www.example.com/most_discussed [R=301,L]
RewriteRule ^top_rated/$ http://www.example.com/top_rated [R=301,L]
RewriteRule ^featured/$ http://www.example.com/featured [R=301,L]
RewriteRule ^directory/$ http://www.example.com/directory [R=301,L]
RewriteRule ^search/$ http://www.example.com/search [R=301,L]
RewriteRule ^logout/$ http://www.example.com/logout [R=301,L]
RewriteRule ^login/$ http://www.example.com/login [R=301,L]
RewriteRule ^lostpw/$ http://www.example.com/lostpw [R=301,L]
RewriteRule ^register/$ http://www.example.com/register [R=301,L]
#Content Area (Relabeled to /channel - previous label kept for smooth upgrade path for beta users - 301 redirect)
RewriteRule ^channel/([^/.]+)$ http://www.example.com/$1 [R=301,L]
RewriteRule ^channel/([^/.]+)/page([^/.]+)$ http://www.example.com/$1/page$2 [R=301,L]
RewriteRule ^channel/([^/.]+)/([^/.]+)$ http://www.example.com/$1/$2 [R=301,L]
RewriteRule ^channel/([^/.]+)/([^/.]+)/page([^/.]+)$ http://www.example.com/$1/$2/page$3 [R=301,L]
RewriteRule ^channel/([^/.]+)/([^/.]+)/([^/.]+)$ http://www.example.com/$1/$2/$3 [R=301,L]
RewriteRule ^channel/([^/.]+)/([^/.]+)/([^/.]+)/page([^/.]+)$ http://www.example.com/$1/$2/$3/page$4 [R=301,L]
RewriteRule ^channel/([^/.]+)/([^/.]+)/([^/.]+)/([^/.]+)$ http://www.example.com/$1/$2/$3/$4 [R=301,L]

RewriteRule ^user/([^/.]+)$ http://www.example.com/$1 [R=301,L]
RewriteRule ^user/([^/.]+)/page([^/.]+)$ http://www.example.com/$1/page$2 [R=301,L]
RewriteRule ^user/([^/.]+)/([^/.]+)$ http://www.example.com/$1/$2 [R=301,L]
RewriteRule ^user/([^/.]+)/([^/.]+)/page([^/.]+)$ http://www.example.com/$1/$2/page$3 [R=301,L]
RewriteRule ^user/([^/.]+)/([^/.]+)/([^/.]+)$ http://www.example.com/$1/$2/$3 [R=301,L]
RewriteRule ^user/([^/.]+)/([^/.]+)/([^/.]+)/page([^/.]+)$ http://www.example.com/$1/$2/$3/page$4 [R=301,L]
RewriteRule ^user/([^/.]+)/([^/.]+)/([^/.]+)/([^/.]+)$ http://www.example.com/$1/$2/$3/$4 [R=301,L]
RewriteRule ^stats/$ http://www.example.com/stats [R=301,L]
RewriteRule ^blog_drafts/$ http://www.example.com/blog_drafts [R=301,L]
RewriteRule ^blog_queue/$ http://www.example.com/blog_queue [R=301,L]
RewriteRule ^blog/$ http://www.example.com/blog [R=301,L]
RewriteRule ^profile/$ http://www.example.com/profile [R=301,L]

RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteRule ^(.*)index.php$ http://www.example.com/$1 [R=301,L]

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




#Profile

RewriteRule ^profile/([^/.]+)$ index.php?profile=TRUE&m=$1 [L]
RewriteRule ^profile$ index.php?profile=TRUE [L]

#Blog

RewriteRule ^blog/page([^/.]+)$ index.php?m=b&page=$1 [L]
RewriteRule ^blog/([^/.]+)$ index.php?m=b&bid=$1 [L]
RewriteRule ^blog$ index.php?m=b [L]

#Blog Queue

RewriteRule ^blog_queue/page([^/.]+)$ index.php?m=b_q&page=$1 [L]
RewriteRule ^blog_queue/([^/.]+)$ index.php?m=b_q&bid=$1 [L]
RewriteRule ^blog_queue$ index.php?m=b_q [L]

#Blog Drafts

RewriteRule ^blog_drafts/page([^/.]+)$ index.php?m=b_d&page=$1 [L]
RewriteRule ^blog_drafts/([^/.]+)$ index.php?m=b_d&bid=$1 [L]
RewriteRule ^blog_drafts$ index.php?m=b_d [L]

#Stats

RewriteRule ^stats$ index.php?stats=TRUE [L]

#Pages
RewriteRule ^page([^/.]+)/?$ index.php?page=$1 [L]

#Content Areas (user kept for beta testers)
RewriteRule ^thumb/([^/.]+)$ /inc/thumbs.php?id=$1 [L]


#Register

RewriteRule ^register$ index.php?register=TRUE [L]
RewriteRule ^registration/([^/.]+)$ index.php?registration=TRUE&un=$1 [L]
RewriteRule ^registration/([^/.]+)/([^/.]+)$ index.php?registration=TRUE&un=$1&verify=$2 [L]

#Password Reminder

RewriteRule ^lostpw$ index.php?lostpw=TRUE [L]

#Login

RewriteRule ^login$ index.php?login=TRUE [L]

#Logout

RewriteRule ^logout$ index.php?logout=TRUE [L]

#Search

RewriteRule ^search/page([^/.]+)$ index.php?search=1&page=$1 [L]
RewriteRule ^search$ index.php?search=1 [L]

#Directory

RewriteRule ^directory/([^/.]+)$ index.php?m=dir&s=$1 [L]
RewriteRule ^directory/([^/.]+)/page([^/.]+)$ index.php?m=dir&s=$1&page=$2 [L]

#Featured

RewriteRule ^featured/page([^/.]+)$ index.php?m=e&page=$1 [L]
RewriteRule ^featured$ index.php?m=e [L]

#Top Rated

RewriteRule ^top_rated/page([^/.]+)$ index.php?m=h&page=$1 [L]
RewriteRule ^top_rated$ index.php?m=h [L]

#Most Discussed

RewriteRule ^most_discussed/page([^/.]+)$ index.php?m=d&page=$1 [L]
RewriteRule ^most_discussed$ index.php?m=d [L]

#Most Viewed

RewriteRule ^most_viewed/page([^/.]+)$ index.php?m=m&page=$1 [L]
RewriteRule ^most_viewed$ index.php?m=m [L]

#Most Recent

RewriteRule ^most_recent/page([^/.]+)$ index.php?m=n&page=$1 [L]
RewriteRule ^most_recent$ index.php?m=n [L]

#Queued

RewriteRule ^queued/page([^/.]+)$ index.php?m=a_q&page=$1 [L]
RewriteRule ^queued$ index.php?m=a_q [L]

#Import Queued

RewriteRule ^import-queued/page([^/.]+)$ index.php?m=i_q&page=$1 [L]
RewriteRule ^import-queued$ index.php?m=i_q [L]

#Import Failed

RewriteRule ^import-failed/page([^/.]+)$ index.php?m=i_f&page=$1 [L]
RewriteRule ^import-failed$ index.php?m=i_f [L]

#Title Editor

RewriteRule ^title-editor$ index.php?m=ti [L]

#SEO Tools

RewriteRule ^seo-tools$ index.php?m=seo [L]

#Channel Editor

RewriteRule ^channel-editor$ index.php?m=ce [L]

#Search Stats

RewriteRule ^search-stats/page([^/.]+)$ index.php?m=ss&page=$1 [L]
RewriteRule ^search-stats$ index.php?m=ss [L]

#Disabled

RewriteRule ^disabled/page([^/.]+)$ index.php?m=a_d&page=$1 [L]
RewriteRule ^disabled$ index.php?m=a_d [L]

#Favorites

RewriteRule ^favorites/page([^/.]+)$ index.php?m=f&page=$1 [L]
RewriteRule ^favorites$ index.php?m=f [L]

#Subscriptions

RewriteRule ^subscriptions/page([^/.]+)$ index.php?m=s&page=$1 [L]
RewriteRule ^subscriptions$ index.php?m=s [L]

#About

RewriteRule ^about$ about.php [L]

#Contact

RewriteRule ^contact$ index.php [L]

#Webmasters

RewriteRule ^webmasters$ index.php [L]

#Popular Tags

RewriteRule ^popular_tags/([^/.]+)$ index.php?m=p&m=$1 [L]
RewriteRule ^popular_tags$ index.php?m=p [L]

#Tags

RewriteRule ^tag/([^/.]+)$ index.php?tag=$1 [L]
RewriteRule ^tag/([^/.]+)/page([^/.]+)$ index.php?tag=$1&page=$2 [L]

#Categories

RewriteRule ^category/([^/.]+)$ index.php?cat=1&scat=$1 [L]
RewriteRule ^category/([^/.]+)/page([^/.]+)$ index.php?cat=1&scat=$1&page=$2 [L]
RewriteRule ^category$ index.php?cat=1 [L]

#Group List
RewriteRule ^girls/([^/.]+)$ index.php?m=girls&s=$1 [L]

#Content Area
RewriteRule ^([^/.]+)$ index.php?uid=$1 [L]
RewriteRule ^([^/.]+)/page([^/.]+)$ index.php?uid=$1&page=$2 [L]
RewriteRule ^([^/.]+)/([^/.]+)$ index.php?uid=$1&pid=$2&gid=$3 [L]
RewriteRule ^([^/.]+)/([^/.]+)/page([^/.]+)$ index.php?uid=$1&pid=$2&page=$3 [L]
RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)$ index.php?uid=$1&pid=$2&gid=$3 [L]
RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/page([^/.]+)$ index.php?uid=$1&pid=$2&gid=$3&page=$4 [L]
RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/([^/.]+)$ index.php?uid=$1&pid=$2&gid=$3&iid=$4 [L]


Thread source:: http://www.webmasterworld.com/apache/4260115.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com