ExpressionEngine Segment Variables Lost on Site Index Page
- by Jesse Bunch
Hey Everyone,
I've been messing with this for days now and can't seem to figure it out. I am trying to pass a 2nd segment variable to my client's index page. The URL I'm trying is: http://www.compupay.com/site/CSCPA/. The problem is, rather than showing the site's index page with the segment variable of "CSCPA" still in the URL, it shows the index page with no segment variables. Initially, I thought it was a .htaccess problem but I couldn't find anything in it that seemed out of whack. Any ideas? I am posting the .htaccess file so another pair of eyes can see it.
Thanks for the help!
# -- LG .htaccess Generator Start --
# .htaccess generated by LG .htaccess Generator v1.0.0
# http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/
# secure .htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
# Dont list files in index pages
IndexIgnore *
#URL Segment Support
AcceptPathInfo On
Options +FollowSymLinks
#Redirect old incoming links
Redirect 301 /contactus.cfm http://www.compupay.com/about_compupay/contact_us/
Redirect 301 /Internet_Payroll.cfm http://www.compupay.com/payroll_solutions/c/online_payroll/
Redirect 301 /Internet_Payroll_XpressPayroll.cfm http://www.compupay.com/payroll_solutions/xpresspayroll/
Redirect 301 /about_compupay.cfm http://www.compupay.com/about_compupay/news/
Redirect 301 /after_payroll.cfm http://www.compupay.com/after_payroll_solutions/
Redirect 301 /news101507.cfm http://www.compupay.com/about_compupay/news/
Redirect 301 /quote.cfm http://www.compupay.com/payroll_solutions/get_a_free_quote/
Redirect 301 /solution_finder_sm.cfm http://www.compupay.com/
Redirect 301 /state_payroll/mississippi_payroll.cfm http://www.compupay.com/resource_center/state_resources/
Redirect 301 /state_payroll/washington_payroll.cfm http://www.compupay.com/resource_center/state_resources/
#Redirect for old top linked to pages
Redirect 301 /Payroll_Services.cfm http://www.compupay.com/payroll_solutions/
Redirect 301 /About_CompuPay.cfm http://www.compupay.com/about_compupay/
Redirect 301 /Partnerships.cfm http://www.compupay.com/business_partner_solutions/
Redirect 301 /about_compupay.cfm?subpage=393 http://www.compupay.com/about_compupay/
Redirect 301 /quote.cfm http://www.compupay.com/payroll_solutions/get_a_free_quote/
Redirect 301 /After_Payroll.cfm http://www.compupay.com/after_payroll_solutions/
Redirect 301 /Accountant_Services.cfm http://www.compupay.com/accountant_solutions/
Redirect 301 /careers/careers_payroll.cfm http://www.compupay.com/about_compupay/careers/
Redirect 301 /Industry_Resources.cfm http://www.compupay.com/resource_center/
Redirect 301 /Client_Resources.cfm http://www.compupay.com/resource_center/client_login/
Redirect 301 /client_resources.cfm?subpage=375 http://www.compupay.com/resource_center/client_login/
Redirect 301 /solution_finder_sm.cfm http://www.compupay.com/payroll_solutions/
Redirect 301 /Internet_Payroll_PowerPayroll.cfm http://www.compupay.com/payroll_solutions/powerpayroll/
Redirect 301 /Payroll_Outsourcing.cfm http://www.compupay.com/payroll_solutions/why_outsource/
Redirect 301 /Phone_Payroll_Fax_Payroll.cfm http://www.compupay.com/payroll_solutions/phone_fax_payroll/
Redirect 301 /contactus.cfm http://www.compupay.com/about_compupay/contact_us/
Redirect 301 /state_payroll/iowa_payroll.cfm http://www.compupay.com/resource_center/state_resources/
Redirect 301 /Construction_Payroll.cfm http://www.compupay.com/payroll_solutions/specialty_payroll/
Redirect 301 /PC_Payroll.cfm http://www.compupay.com/payroll_solutions/c/pc_payroll/
Redirect 301 /state_payroll/washington_payroll.cfm http://www.compupay.com/resource_center/state_resources/
Redirect 301 /Internet_Payroll_XpressPayroll.cfm http://www.compupay.com/payroll_solutions/xpresspayroll/
Redirect 301 /accountant_services.cfm?subpage=404 http://www.compupay.com/accountant_solutions/
Redirect 301 /after_payroll.cfm http://www.compupay.com/after_payroll_solutions/
Redirect 301 /after_payroll.cfm?subpage=361 http://www.compupay.com/after_payroll_solutions/
Redirect 301 /after_payroll.cfm?subpage=362 http://www.compupay.com/after_payroll_solutions/
Redirect 301 /after_payroll.cfm?subpage=363 http://www.compupay.com/after_payroll_solutions/
Redirect 301 /after_payroll.cfm?subpage=364 http://www.compupay.com/after_payroll_solutions/
Redirect 301 /after_payroll.cfm?subpage=365 http://www.compupay.com/after_payroll_solutions/
Redirect 301 /after_payroll.cfm?subpage=366 http://www.compupay.com/after_payroll_solutions/
Redirect 301 /after_payroll.cfm?subpage=367 http://www.compupay.com/after_payroll_solutions/
Redirect 301 /after_payroll.cfm?subpage=368 http://www.compupay.com/after_payroll_solutions/
Redirect 301 /after_payroll.cfm?subpage=369 http://www.compupay.com/after_payroll_solutions/
Redirect 301 /after_payroll.cfm?subpage=416 http://www.compupay.com/after_payroll_solutions/
Redirect 301 /payload_payroll.cfm http://www.compupay.com/payroll_solutions/payload/
Redirect 301 /payroll_services.cfm?subpage=358 http://www.compupay.com/payroll_solutions/
Redirect 301 /payroll_services.cfm?subpage=399 http://www.compupay.com/payroll_solutions/
Redirect 301 /payroll_services.cfm?subpage=409 http://www.compupay.com/payroll_solutions/
Redirect 301 /payroll_services.cfm?subpage=413 http://www.compupay.com/payroll_solutions/
Redirect 301 /payroll_services.cfm?subpage=418 http://www.compupay.com/payroll_solutions/
Redirect 301 /state_payroll/mississippi_payroll.cfm http://www.compupay.com/resource_center/state_resources/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Remove the www
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Force www
RewriteCond %{HTTP_HOST} !^www.compupay.com$ [NC]
RewriteRule ^(.*)$ http://www.compupay.com/$1 [R=301,L]
# Add a trailing slash to paths without an extension
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule ^(.*)$ $1/ [L,R=301]
#Legacy Partner Link Redirect
RewriteCond %{QUERY_STRING} partnerCode=(.*) [NC]
RewriteRule compupay_payroll.cfm site/%1? [R=301,L]
# Catch any remaining requests for .cfm files
RewriteCond %{REQUEST_URI} \.cfm
RewriteRule ^.*$ http://www.compupay.com/ [R=301,L]
#Expression Engine
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
AcceptPathInfo On
</IfModule>
# Remove IE image toolbar
<FilesMatch "\.(html|htm|php)$">
Header set imagetoolbar "no"
</FilesMatch>
# enable gzip compression
<FilesMatch "\.(js|css|php)$">
SetOutputFilter DEFLATE
</FilesMatch>
#Deal with ETag
<IfModule mod_headers.c>
<FilesMatch "\.(ico|flv|jpg|jpeg|png|gif)$">
Header unset Last-Modified
</FilesMatch>
<FilesMatch "\.(ico|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header unset ETag
FileETag None
Header set Cache-Control "public"
</FilesMatch>
</IfModule>
<IfModule mod_expires.c>
<FilesMatch "\.(ico|flv|jpg|jpeg|png|gif|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 year"
</FilesMatch>
</IfModule>
#Force Download PDFs
<FilesMatch "\.(?i:pdf)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
#Increase Upload Size
php_value upload_max_filesize 5M
php_value post_max_size 5M
# -- LG .htaccess Generator End --