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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:30:08+00:00 2026-06-11T01:30:08+00:00

Have a following rewriting rule RewriteEngine On RewriteCond %{REQUEST_URI} !/(js|css|images)/ RewriteRule section/([0-9a-zA-Z_-]+)$ /index.php?controller=section&method=index&param=$1 RewriteRule

  • 0

Have a following rewriting rule

RewriteEngine On
RewriteCond %{REQUEST_URI} !/(js|css|images)/

RewriteRule section/([0-9a-zA-Z_-]+)$ /index.php?controller=section&method=index&param=$1
RewriteRule category/([0-9a-zA-Z_-]+)$ /index.php?controller=category&method=products&param=$1
RewriteRule ([0-9a-zA-Z_-]+)/([0-9a-zA-Z_-]+)/(.*)$ /index.php?controller=$1&method=$2&param=$3
RewriteRule ([0-9a-zA-Z_-]+)/([0-9a-zA-Z_-]+)$ /index.php?controller=$1&method=$2

Now, when I call for /js/jquery.js, I get the file fine. But if the file is one folder level deeper, eg. /js/fancybox/jquery.fancybox-1.3.4.pack.js, it doesn’t. It has something to do with section and category rules as everything works fine when I remove those two lines

  • 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-11T01:30:10+00:00Added an answer on June 11, 2026 at 1:30 am

    You need to repeat the condition for each rule, the condition only applies to the immediately following rule. The reason why it works when you remove the 2 section and category rules is because the condition is being applied to the 3rd rule (which is what’s messing you up). You need the condition repeated for each rule:

    RewriteEngine On
    
    RewriteCond %{REQUEST_URI} !/(js|css|images)/
    RewriteRule section/([0-9a-zA-Z_-]+)$ /index.php?controller=section&method=index&param=$1
    
    RewriteCond %{REQUEST_URI} !/(js|css|images)/
    RewriteRule category/([0-9a-zA-Z_-]+)$ /index.php?controller=category&method=products&param=$1
    
    RewriteCond %{REQUEST_URI} !/(js|css|images)/
    RewriteRule ([0-9a-zA-Z_-]+)/([0-9a-zA-Z_-]+)/(.*)$ /index.php?controller=$1&method=$2&param=$3
    
    RewriteCond %{REQUEST_URI} !/(js|css|images)/
    RewriteRule ([0-9a-zA-Z_-]+)/([0-9a-zA-Z_-]+)$ /index.php?controller=$1&method=$2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble with url rewriting. I have the following rule working fine: RewriteRule
I have the following mod_rewrite rule: RewriteRule ^home/ home.php [L] Fairly simple. When I
Assuming the following directory structure, htdocs/ images/ css/ .htaccess system/ index.php ... I would
I have the following component @ ?option=com_tmportal&module=user&task=main I've enabled url rewriting and setup the
I had the following rewriting set up in my .htaccess file: RewriteRule ^(\w+)/?$ profile.php?customURL=$1
I have following nested objects. I am using @Valid for validation in my controller.
I have following CSS: table tbody tr:last-child td { padding-top: 7px; border-bottom: 0; }
I have a PHP scripted named index.php inside a folder named blog. There are
I have the following site layout. Main page is being loaded using url rewriting
I have the following rewrite URL: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Rewrite

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.