.htaccess to allow #fontface [closed] - .htaccess

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am using the master .htaccess from http://docs.joomla.org
Its working well but its also locking out all my woff|eot|svg|ttf
How can I add these to the allowed filetypes?
My fonts reside in /templates/mytemplate/css/type/ folder

I believe this is the line in question:
## Allow limited access for certain Joomla! system directories with client-accessible content
RewriteRule ^(components|modules|plugins|templates)/([^/]+/)*([^/.]+\.)+(jp(e?g|2)?|png|gif|bmp|css|js|swf|html?|mp(eg?|[34])|avi|wav|og[gv]|xlsx?|docx?|pptx?|zip|rar|pdf|xps|txt|7z|svg|od[tsp]|flv|mov)$ - [L]
Basically, in certain folders - including the templates/ folder, only certain file types are being allowed and your files aren't in the list. Adding them in the final bracketed clause pipe separated should do the job. Something like...
RewriteRule ^(components|modules|plugins|templates)/([^/]+/)*([^/.]+\.)+(jp(e?g|2)?|png|gif|bmp|css|js|swf|html?|mp(eg?|[34])|avi|wav|og[gv]|xlsx?|docx?|pptx?|zip|rar|pdf|xps|txt|7z|svg|od[tsp]|flv|mov|woff|eot|svg|ttf)$ - [L]

Related

How to use url rewrite with parameters [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How to use url rewrite with parameters
example.com/news.php?id=1 to example.com/news/1
And the value of number will change dynamically.
RewriteEngine On
RewriteRule ^news/([0-9]*)$ /news.php?id=$1 [L]
Yes, there are many similar questions. But here is how to do it.
RewriteEngine On
RewriteRule ^news/([0-9]+)/?$ news.php?id=$1 [NC,L]
You should have mod_rewrite enabled in your server.

I want show different url and execute different url [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want show below url
http://example.com/folder1
and execute url is
http://example.com/?test=folder1
In .htaccess file try this
RewriteEngine On
RewriteRule ^([a-z0-9_\-]+)$ index.php?test=$1 [L,NC]

Where should an `.htaccess` file be located? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I noticed that I had two .htaccess file on my website's server, one in the root folder, one in the www folder. Which one is active and which one should I delete?
You put the .htaccess in the folder whose behavior you want to alter. This also affects the behavior of all the sub-folders. It can happen that you want different behavior for one or more of the sub-folders in which case you give them their own .htaccess file and override the settings that are not to be inherited from the parent.

What is up with Linux and Apache's ".d"? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Linux and Apache suffix a bunch of files and folders with d or .d.
init.d
rc.d
/etc/httpd/conf.d
/etc/httpd/vhost.d
What is the meaning of this convention?
It means simply "directory" and commonly indicates that either a single file, or a directory full of them is acceptable for configuration.
(In the case of rc.d, that replaces the old-style Unix /etc/rc script which is no longer used on Linux.)
Means "a directory", containing a bunch of files intended for the same goal (init scripts in init.d, configuration files in conf.d, etc.) - this tendency seems to have expanded onto separate files, too.

htaccess redirect url parameter as segment [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is it possible to redirect url parameters as segments in .htaccess file?
i.e.
test/index.php?parameter=MYVALUE
to
test/MYVALUE/
Yes. Try this:
RewriteCond %{QUERY_STRING} parameter=(.*)
RewriteRule test/index\.php test/%1
According to "What is matched?" in the mod_rewrite docs, the query string (part after the ?) is separated out into the QUERY_STRING variable, which then has to be tested separately from the main part of the URL. In RewriteCond, the parameter value is captured by the regular expression within the parentheses (.*), and is then available as %1 in the RewriteRule.

Resources