1

I have a question regarding my .htaccess

below is my tree structure..

/root
index.php
.htaccess 
  /admin
  index.php
  .htaccess

Below is my htaccess for my root

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ /index.php?url=$1 [QSA,L]

Below is my htaccess for my admin

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ /admin/index.php?url=$1 [QSA,L]

Now what happens is when in my root domain say it is therealartofprotest.com, when i change it in the address bar to www.therealartofprotest.com, all my resources that are located in admin, dont work anymore, but when i take it off.. they work.

You can have a look at the home page of http://therealartofprotest.com. The homepage has a map with properties that are loaded via Json from the admin folder named equinox, and when you change it to http://www the json breaks, because the json url is also run by htaccess in admin panel.

Any ideas please help, I suck with .htaccess programming

Eddsters
  • 458
  • 1
  • 4
  • 16
  • Maybe you have to add some exception `RewriteRule ^(admin)($|/) - [L]` in your root `.htaccess` file. Check this link [how to exclude directory from rewrite rule](http://stackoverflow.com/questions/1848500/htaccess-mod-rewrite-how-to-exclude-directory-from-rewrite-rule) – Thiago Augustus Oliveira Sep 11 '15 at 17:16
  • 1
    different vhost definitions for www.yoursite v.s. just yoursite? – Marc B Sep 11 '15 at 17:18
  • basically adding a www just breaks all the image locations fonts and stuff for the admin... no idea why... – Eddsters Sep 11 '15 at 20:23

0 Answers0