Knowledgebase: User Manual
Servepage.php and usage
Posted by John [Elevated X Support] on 30 January 2020 01:31 PM

'servepage.php' is a stub file used for SEO. It assists mod_rewrite rules within .htaccess convert an SEO URL into a Non-SEO URL.

Valid values of $_GET["t"]:

scenes: converts the $_GET["id"] that's passed to this file to a set id, and does an include for gallery.php
categories: converts the $_GET["id"] that's passed to this file to a category id, and does an include for category.php
trailers: converts the $_GET["id"] that's passed to this file to a set id, and does an include for trailer.php
models: converts the $_GET["id"] that's passed to this file to a model id, and does an include for sets.php
news: converts the $_GET["id"] that's passed to this file to a news id, and does an include for news.php
dvds: converts the $_GET["id"] that's passed to this file to a dvd id, and does an include for dvds.php
bonus: converts the $_GET["id"] that's passed to this file to a bonus id, and does an include for bonus.php
calendar: converts the $_GET["id"] that's passed to this file to a calendar id, and does an include for calendar.php
tour: converts the $_GET["id"] that's passed to this file to a calendar id, and does an include for the tour's index.php
store: converts the $_GET["id"] that's passed to this file to a store entry id, and does an include for store.php

Any other arguments that are passed to servepage.php are passed through to the corresponding file (e.g: gallery.php)


Sample .htaccess file with servepage.php rewrites:

RewriteEngine On

RewriteRule ^scenes/([a-z|0-9|-]+)_([a-z|0-9|-]+)_?([0-9]*)_?(.*)\.html$ servepage.php?t=scenes&id=$1&page=$3&type=$2&mt=$4 [NC,QSA,L]
RewriteRule ^scenes/([a-z|0-9|-]+)_?([0-9]*)\.html$ servepage.php?t=scenes&id=$1&page=$2 [NC,QSA,L]
RewriteRule ^categories/([a-z|0-9|-]+)_?([0-9]*)_?([a-z|0-9]*)_?([a-z|0-9]*)\.html$ servepage.php?t=categories&id=$1&page=$2&s=$3&sw=$4 [NC,QSA,L]

# Model listing page
RewriteRule ^models/(([a-z]?)/?)models(_?([0-9]*))(_?([a-z]?))\.html$ sets.php?sw=$2&page=$4&s=$6 [NC,QSA,L]

# Individual model page
RewriteRule ^models/([a-z|0-9|-]+)_?(.*)\.html$ servepage.php?t=models&id=$1&page=$2 [NC,QSA,L]

#News Rewrite
RewriteRule ^blog/blog\.html$ news.php [NC,QSA,L]
RewriteRule ^blog/blog_page_([0-9]+)\.html$ news.php?page=$1 [NC,QSA,L]
RewriteRule ^blog/([a-z|0-9|-]*)\.html$ servepage.php?t=news&id=$1 [NC,QSA,L]
RewriteRule ^blog/tags/([a-z|0-9|-]*)-page([0-9]+)\.html$ news.php?tag=$1&page=$2 [NC,QSA,L]
RewriteRule ^blog/tags/([a-z|0-9|-]*)\.html$ news.php?tag=$1 [NC,QSA,L]

#Extra Pages
RewriteRule ^pages/([a-z|0-9|-]*)\.html$ pages.php?id=$1 [NC,QSA,L]

#DVD Rewrite
RewriteRule ^dvds/dvds\.html$ dvds.php [NC,QSA,L]
RewriteRule ^dvds/dvds_page_([0-9]+)\.html$ dvds.php?page=$1 [NC,QSA,L]
RewriteRule ^dvds/([a-z|0-9|-]*)\.html$ servepage.php?t=dvds&id=$1 [NC,QSA,L]

#Index updates
RewriteRule ^updates/page_([0-9]+)\.html$ index.php?page=$1 [NC,QSA,L]
RewriteRule ^comingsoon/$ index.php?template=comingsoon [NC,QSA,L]
RewriteRule ^facebook/$ index.php?template=facebook [NC,QSA,L]
RewriteRule ^twitter/$ index.php?template=twitter [NC,QSA,L]

RewriteRule ^our\-sites/([a-z|0-9|-]+)\.html$ servepage.php?t=bonus&fc=1&id=$1 [NC,QSA,L]
RewriteRule ^video\-feeds/([a-z|0-9|-]+)\.html$ servepage.php?t=bonus&fc=2&id=$1 [NC,QSA,L]
RewriteRule ^audio\-files/([a-z|0-9|-]+)\.html$ servepage.php?t=bonus&fc=4&id=$1 [NC,QSA,L]
RewriteRule ^erotic\-stories/([a-z|0-9|-]+)\.html$ servepage.php?t=bonus&fc=3&id=$1 [NC,QSA,L]
RewriteRule ^live\-cams/([a-z|0-9|-]+)\.html$ servepage.php?t=bonus&fc=5&id=$1 [NC,QSA,L]
RewriteRule ^friends/([a-z|0-9|-]+)\.html$ servepage.php?t=bonus&fc=6&id=$1 [NC,QSA,L]
RewriteRule ^bonus/$ bonus.php [NC,QSA,L]

#FAQ Rule
RewriteRule ^faq/faq\.html$ faq.php [NC,QSA,L]

#Calendar
RewriteRule ^calendar/$ calendar.php [NC,QSA,L]
RewriteRule ^calendar/([0-9]{4})_([0-9]{2})\.html$ calendar.php?year=$1&month=$2 [NC,QSA,L]
RewriteRule ^calendar/([a-z|0-9|-]+)\.html$ servepage.php?t=calendar&id=$1 [NC,QSA,L]

(0 vote(s))
Helpful
Not helpful

Comments (0)