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 6563375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:49:27+00:00 2026-05-25T13:49:27+00:00

I have a problem with my rewriterule in my .htaccess To begin, i have

  • 0

I have a problem with my rewriterule in my .htaccess
To begin, i have a wlidcard on my website (*.site.com)

Here is the path of my website :

/home/www/static/
/home/www/home/
/home/www/.htaccess

So i made a .htaccess at the root of my website with :

RewriteCond %{HTTP_HOST} static.site.com [NC]
RewriteRule !^static/ static%{REQUEST_URI}

RewriteCond %{HTTP_HOST} www.site.com [NC]
RewriteRule !^home/ home%{REQUEST_URI}

These redirects run pretty good but when i want to go to for example :

http://www.site.com/img

There’s a problem, it’s redirecting me in http://www.site.com/home/img/

But when i type http://www.site.com/img/ with the final backslash everything is ok.

Thanks for replies 🙂

  • 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-05-25T13:49:28+00:00Added an answer on May 25, 2026 at 1:49 pm

    Solved :

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,6}|/|#(.*))$
    RewriteRule ^(.*)$ $1/ [R=301,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, I have a small problem with .htaccess RewriteRule. I made simple website locally
I have problem with my .htaccess redirections. Say I want to change http://www.domain.com/login.php into
I have problem with my .htaccess redirections. When I type: http://www.domain.com/contact it goes to
I have a problem with .htaccess. I have a website in the main server
Hy! I'm developing a web site and have a small problem with .htaccess .
I have the following problem: http://www.mydomain.com/articles.php?artid=89 should become: http://www.mydomain.com/mykeyword I dont mind if the
I have the following code in my htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} !^www.example.com$
Possible Duplicate: .htaccess RewriteRule for Flat Links i have a problem in a rewrite
I have the following .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^mydomain.com RewriteRule
I seem to have problem with an .htaccess rewriterule. What I want to do

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.