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

  • Home
  • SEARCH
  • 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 4079466
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:48:20+00:00 2026-05-20T17:48:20+00:00

So I have this rule in place # Rewrite for account view RewriteRule ^([^/]+)/([^/]+)/?$

  • 0

So I have this rule in place

# Rewrite for account view
RewriteRule ^([^/]+)/([^/]+)/?$ account.php?type=$1&user=$2 [NC,L]

which translate to http://www.site.com/user/s2xi

but now I want to get even more creative with the url and append a theme location to it so:

http://www.site.com/user/s2xi/theme/slate/

so that I can for instance access the CSS file for the theme I would simply need to type in

http://www.site.com/user/s2xi/theme/slate/css/slate.css

how can I modify or add another RewriteRule to be able to get the results I want?

also, how would I be able to apply and access my theme files with the new url in my PHP code?

my current path to my themes is library/themes/users/slate with sub folders /css and /js

My attempt:

# Rewrite for user theme location
RewriteRule ^([^/]+)/([^/]+)/theme/([^/]+)/?$ account.php?type=$1&user=$2$theme=$3 [NC,L]
  • 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-20T17:48:21+00:00Added an answer on May 20, 2026 at 5:48 pm

    I suggest redirecting all requests to one file, e.g. index.php and then get the url by using $_SERVER['REQUEST_URI']. You can then use this data and for example explode it. Then you will be able to dynamically determine which page will be loaded.

    You can use the following code to redirect all requests to index.php:

    RewriteEngine on
    
    RewriteRule .* index.php
    

    You could also exclude particular filetypes from being redirected to this PHP file. For example static content like CSS, JavaScript etc. The following code will, for example, exclude all files with a CSS, JS, PNG or JPG extension:

    RewriteEngine on
    
    RewriteRule !\.(css|js|png|jpg)$ index.php

    To exclude all files that do exist, you could use the following code:

    RewriteEngine on
    
    RewriteCond %{REQUEST_fileNAME} !-f
    RewriteRule .* index.php
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this rewrite rule RewriteEngine On RewriteBase /location/ RewriteRule ^(.+)/?$ index.php?franchise=$1 Which is
I have this rule: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !index.php RewriteRule ^(.*)$ index.php?req=$1
I have this rewrite rule in my .htaccess file, but in PHP when I
I have a problem with rewrite rule my link is www.something/group/group_id/place/groupName for this rewriteBase
I have the following .htaccess rule: RewriteEngine on RewriteRule ^(.*) http://www.server2.com/index.php?action=$1 I need to
I want to have URLs like this: some-company-name-deal-id-6.htm So the rewrite rule should ignore
I have a free shipping price rule which is configured like this: All customer
I think this may be relatively straight forward. I have a rewrite rule that
I have a rewrite rule in my web.config file like this: <rule name=Public page
I have added this rule in my web.config to redirect non www URLs to

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.