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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:05:08+00:00 2026-06-03T17:05:08+00:00

I use lessCSS. And problem I have is that if in CodeIgniter I set

  • 0

I use lessCSS. And problem I have is that if in CodeIgniter I set base URL as http://www.mysite.com, and in my browser I go to mysite.com less doesnt render.

And the other way around…

Console gives me this:

XMLHttpRequest cannot load xxxx Origin http://mysite.lt is not allowed by Access-Control-Allow-Origin.

less-1.2.1.min.js:8Uncaught Error: NETWORK_ERR: XMLHttpRequest Exception 101

  • 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-03T17:05:11+00:00Added an answer on June 3, 2026 at 5:05 pm

    Add this to your .htaccess file (assuming you are using Apache):

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
    

    That will always add www. even if the user doesn’t type it. That should solve your issue.

    To do this and remove index.php from urls I use this block of code for my EE installs (which uses CI)

    <IfModule mod_rewrite.c>
    
            RewriteEngine On
    
            # Removes index.php
    
            RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ /index.php/$1 [L]
    
            # Redirects index.php when user adds them to a URL
    
            RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
            RewriteCond %{THE_REQUEST} !/system/.*
            RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,L]
    
            # Appends www when absent
    
            RewriteCond %{http_host} ^mysite.com [NC,OR]
            RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
    
    </IfModule>
    

    First block is your standard EE based rewrite to remove index.php from all your URLS. The second block of code is a nice addition that keeps urls, where index.php is added anyway by the user, from resolving and giving you duplicate urls with search engines (thus hurting SEO). Instead it properly forwards to the correct URL if it exists, or returns a 404 where appropriate. And of course the final block of code adds (or can remove) www.

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

Sidebar

Related Questions

use WWW::Mechanize; my $mech = WWW::Mechanize->new; $mech->get( $url ); say $mech->text; How could I
I am trying to use LESS CSS to write my CSS. I have imported
I am trying to use LESS CSS to write my CSS. I have imported
use case example I have a servlet that is receiving login requests. If a
Use http://jobs.sitesixteen.com/ for reference. I'm using YQL for the city, state auto-complete. IF you
I know that there is no if/else in LESS CSS and use-cases where if/else
use LWP::Simple; use Parallel::ForkManager; @links=( [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-2.1-windows.exe,SweetHome3D-2.1-windows.exe], [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3D-2.1-macosx.dmg,SweetHome3D-2.1-macosx.dmg], [http://prdownloads.sourceforge.net/sweethome3d/SweetHome3DViewer-2.1.zip,SweetHome3DViewer-2.1.zip], ); # Max 30 processes for
I'm planning on using buildout to build a webapp. I want to use lesscss
Originally I had my css .less file named Site.less.css so that intelligent type is
USE master GO DECLARE @DbName nvarchar(MAX) SET @DbName = N'DataBase' ALTER DATABASE @DbName SET

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.