Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9060207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:10:01+00:00 2026-06-16T15:10:01+00:00

I have the following code setup in my htaccess file for my Laravel 3

  • 0

I have the following code setup in my htaccess file for my Laravel 3 installation:

# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]

# Enforce www
RewriteCond %{HTTP_HOST} ^([0-9a-z-]+)\.([0-9a-z-]+)$ [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

# Remove index.php from base URL
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Which looks all well and good untill the first ReWrite condition is accessed.

Navagating to this url:

/information/

Redirects me to:

/home/xxx/Dropbox/Development/laravel/httpdocs/information

So the trailing slash is being removed, but it redirecting to the abolsute URL.

Why is it doing that? How do I fix it?

Thanks 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T15:10:03+00:00Added an answer on June 16, 2026 at 3:10 pm

    Add a RewriteBase / (or whatever the base URI should be) above all of your rules.

    What’s happening is that mod_rewrite tries to guess if the target of a rewrite rule is a URL path or a file path and it is guessing incorrectly that it’s a file path and appends the incorrect base path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: // Setup a content array for the tooltips var
I have the following code setup for my admin_add in my photocategories_controller.php file. This
I have the following code setup: http://jsfiddle.net/bABHU/2/ Had to change it a little bit
I have the following piece of code: // setup the AJAX request var pageRequest
I have the following code: [SetUp] public void SetMeUp() { Mapper.CreateMap<SourceObject, DestinationObject>(); } [Test]
I have the following code: var service = new Mock<INavigationService>(); service.Setup(x => x.GetSchemes(new SchemeFilterEntity())).Returns(new
I have the following code: if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { // Setup the
I have the following code: var connector = new Mock<IConector>(); connector .Setup(cn => cn.listar(FetchEstandar,
Setup: Having a dumb day. I have the following code: UserRoles = Roles.GetRolesForUser(username); Problem:
Ok so i have the following code setup which seems to work fine: user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.