logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



htaccess issue with rewrite rules/ conditions

 
Post new topic   Reply to topic    Apache Forum Index -> Apache



View previous topic :: View next topic  
Author Message
zxlg



Joined: 19 Jul 2017
Posts: 2
Location: USA, Tampa

PostPosted: Wed 19 Jul '17 18:07    Post subject: htaccess issue with rewrite rules/ conditions Reply with quote

Hi,

I am trying to remove the trailing slash from certain pages. However, I am having issues with the Rewrite conditions. The trailing slash is removed from: /checkout/onepage/success/ and it should not be. I have the following added to my htaccess file of my website root folder.
I am running Apache version: 2.4.27 in an environment using cpanel 64 and Centos 6.9. Any thoughts on the issue are appreciated.

Code:

## enable rewrites

Options +FollowSymLinks
RewriteEngine on

#direct all traffic to https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

#trailing slash policy
RewriteCond %{REQUEST_URI} !^/index.php/
RewriteCond %{REQUEST_URI} !^/contactus/
RewriteCond %{REQUEST_URI} !^/customer/
RewriteCond %{REQUEST_URI} !^/checkout/
RewriteRule ^(.*)/$ /$1 [L,R=301]]
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6238
Location: Germany, Next to Hamburg

PostPosted: Sun 23 Jul '17 17:10    Post subject: Reply with quote

is the setting AllowOverride All ?
Back to top
zxlg



Joined: 19 Jul 2017
Posts: 2
Location: USA, Tampa

PostPosted: Tue 25 Jul '17 20:46    Post subject: Reply with quote

Thanks for your reply.
I asked the hosting company and they said that AllowOverride is set to All in the apache configuration.
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1