Welcome Guest, Not a member yet? Register   Sign In
Help with an htaccess Issue
#1

[eluser]Walter Coots[/eluser]
I have all my images, css and js filed under "/assets/frontend/<skin name>/img", "/assets/frontend/<skin name>/css" (etc). I was trying to write a RewriteCond that allowed linking to files under /assets/, but kept running into 403 errors.

Code:
RewriteCond $1 !^(index\.php|favicon\.ico|assets|robots\.txt)

What am I missing?
#2

[eluser]WanWizard[/eluser]
For starters the rest of your htaccess, because this single line doesn't say much...
#3

[eluser]Unknown[/eluser]
Is your assets directory inside your "application" directory?
#4

[eluser]Walter Coots[/eluser]
Apologies! For some reason I thought that line I'd previously posted determined what top-level directories and files were allowed / disallowed. But I guess it's not so simple? I have two applications, frontend.php and admin.php. My files are structured like so:

/admin/ (application folder)
/assets/
- /admin
- /frontend/
- - /<skin name>/
- - - /css/
- - - /img/
- - - /js/
- /shared/
/frontend/ (application folder)
/system/

What's really throwing me off is that my admin application is having no problems whatsoever accessing the CSS, images and JavaScript in /assets/admin.

Code:
Options -Multiviews
Options +FollowSymLinks
Options -Indexes
Allow From All
DirectoryIndex frontend.php admin.php
RewriteEngine On
RewriteBase /

RewriteCond $1 !^(index\.php|frontend\.php|favicon\.ico|assets|robots\.txt|admin\.php|data\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^site(.*)$ frontend.php/$1 [L,QSA]
RewriteRule ^admin(.*)$ admin.php/$1 [L,QSA]
RewriteRule ^data(.*)$ admin.php/$1 [L,QSA]
RewriteRule ^login(.*)$ admin.php/$1 [L,QSA]
#5

[eluser]Walter Coots[/eluser]
Ah, sorry. I figured it out - it was a permissions issue on the CSS file I was trying to access.




Theme © iAndrew 2016 - Forum software by © MyBB