Code Monkey home page Code Monkey logo

Comments (2)

erikreagan avatar erikreagan commented on July 18, 2024

Hey Brett

Thanks for the great addition to the EE community!

You bet! Thanks for the appreciation :)

I'm having an issue when I try to force trailing slashes using some .htaccess rules. ... Have you encountered this before?

No, I can't say I have.

The primary issue is that you're matching an environment on a specific IP address and your .htaccess rule is redirecting to the IP plus port number which fails on the PHP switch statement. Why you're getting redirected there - I can't say. Your redirect match is somewhat odd though, can you try being a bit more "loose" in your match? Give this a try if you can:

# Make sure it's not a directory root
RewriteCond %{REQUEST_FILENAME} !-d
# Catch any+all characters and throw a slash in as the last character
RewriteCond %{REQUEST_URI} ^(.+)/$
# Redirect to same URI sans trailing slash (and use 301 for SEO goodness)
RewriteRule ^(.+)/$  /$1 [R=301,L]

Can you give that a shot?

from ee-master-config.

erikreagan avatar erikreagan commented on July 18, 2024

@brettdewoody - just wanted to ping you on this to see if you'd been notified by GitHub about my reply. I'm not familiar enough with how GitHub does email notifications.

Erik

from ee-master-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.