The Way to Programming
The Way to Programming
Is there something in this .htaccess that would prevent my php script from working (with out error)
on my hosting company upgrade to php 5.4?
The script will work ok on php 5.2.
I thought it was working before on 5.4 but something was changed and I am trying to figure it out…
#AddHandler application/x-httpd-php5 .php
# enable mod_rewrite
Options -MultiViews
RewriteEngine on
RewriteBase /
# mod_rewrite rules Google Sitemap Yahoo site feed
RewriteRule ^sitemap.xml$ gy-sitemap.php?service=google [QSA,L]
RewriteRule ^urllist.txt$ gy-sitemap.php?service=yahoo [QSA,L]
# SECTION 1
# correct urls for yahoo bot
RewriteCond %{REQUEST_URI} !\..+$
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
# SECTION 2
# mod_rewrite rules for ROOT category
RewriteRule ^index([0-9]+).html$ index.php?category=0&page=$1 [QSA,L]
# SECTION 3
# mod_rewrite rules for categories pages with HTML path option disable
RewriteRule ^(.*)/$ index.php?category=$1 [QSA,L]
RewriteRule ^(.*)/index([0-9]+).html$ index.php?category=$1&page=$2 [QSA,L]
# SECTION 4
# mod_rewrite rule for suggest listing page
RewriteRule report-listing.php$ report-listing.php [QSA,L]
# SECTION 5
RewriteRule ^([a-z]+)-listings.html$ listings.php?view=$1 [QSA,L]
RewriteRule ^([a-z]+)-listings([0-9]+).html$ listings.php?view=$1&page=$2 [QSA,L]
# SECTION 6
# mod_rewrite rules for view listing page
RewriteRule ^([^/]+)-l([0-9]+).html$ view-listing.php?cat=&title=$1&id=$2 [QSA,L]
RewriteRule ^(.*)/([^/]+)-l([0-9]+).html$ view-listing.php?cat=$1&title=$2&id=$3 [QSA,L]
# SECTION 7
# mod_rewrite rules for additional pages
RewriteRule ^p(.*).html$ page.php?name=$1 [QSA,L]
# SECTION 8
# mod_rewrite rules for error pages
RewriteRule ^([0-9]+).htm$ error.php?error=$1 [QSA,L]
# SECTION 9
# mod_rewrite rules for suggest category page
RewriteRule ^suggest-category-([0-9]+).html$ suggest-category.php?id=$1 [QSA,L]
# SECTION 10
RewriteRule ^LICENSE.htm$ LICENSE.htm [QSA,L]
# SECTION 11
# mod_rewrite rules for categories pages
RewriteRule ^(.*)_([0-9]+).html$ index.php?category=$1&page=$2 [QSA,L]
RewriteRule ^(.*).html?(.*)$ index.php?category=$1&$2 [QSA,L]
RewriteRule ^(.*).html$ index.php?category=$1 [QSA,L]
# SECTION 12
ErrorDocument 500 500.htm
ErrorDocument 404 404.htm
ErrorDocument 403 403.htm
ErrorDocument 401 401.htm
Sign in to your account