.htaccess reference with examples - .htaccess

Need link, if it exist, to good and full .htaccess reference with examples.
Thanks.

How about the actual documentation for apache. httpd.apache.org howto htaccess.

http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html

http://httpd.apache.org/docs/2.0/howto/htaccess.html
You can do so many things with .htaccess file, that there are probably no comprehensive set of examples.

Related

How do you give content pretty permalinks in Pakyow?

By default, Pakyow has URLs like /authors/1.
How can I also/instead have URLs like /authors/s-kyle-newman?
With help from Bryan, I figured it out and put it in a blog post about pretty permalinks and canonical URLs. If you've stumbled on this answer, I hope it helps.

htaccess 301 wanted experts in htaccess

Question how do i rewrite
http://www.mywebsite.nl/support/department/index.php?/Ontruimingsvonnis/Knowledgebase/List/
to
http://www.mywebsite.nl/support/knowlegdebase/list
i have tried different ways to solve it but sofar no luck. Me and htaccess just aint friends.
Who will be able to help me out with this is need a 301 redirect for this one?
Could it also be that the index.php? would give a problem here?
Thanks in advance,
Paul
My Memory is a little hazy on this (its been a couple of years since i had to do this) but i believe mrewrite is what you need to use.
After a little digging, i found the page that might be helpful
http://www.workingwith.me.uk/articles/scripting/mod_rewrite

Is there any danger in posting your .htaccess file on a forum?

As title says. I am looking for some help with my .htaccess. I have been offered help on an apache forum however before i post my .htaccess for others to see i wondered if by doing this the security of my site could be compromised in any way??
Thanks
P
Maybe? It depends?
If you have something that includes a secure system path like the location of AuthUserFile, you might want to put in some dummy text before posting:
AuthUserFile /PATH_TO_FILE/
Most of the boiler plate stuff (ErrorDocument, hiding the .htaccess, -Indexes, etc...) though, wouldn't worry about it.

Simple URL rewrite, not redirect, with .htaccess

I'm pretty inexperienced with .htaccess so please bear with me.
I have a domain - "http://www.exampletest.com"
which redirects to a folder at a different domain where I have hosting i.e:
"http://www.differenturl.com/exampletest"
Is there an easy mod_rewrite rule where I could have anything at "http://www.differenturl.com/exampletest" show up as "http://www.exampletest.com?" An example would be:
"http://www.differenturl.com/exampletest/user.php" -> "http://www.exampletest.com/user.php"
Any assistance is greatly appreciated. I assume this easy so sorry to ask such a basic question.
Thanks
You say "rewrite, not redirect", so no, there isn't a simple way to do this. The only way to do what you ask would be to have a "reverse proxy" running on www.exampletest.com that fetches content from "www.differenturl.com/exampletest/". That isn't something you can do with mod_rewrite.
If I have understood correctly, following code might do:
RewriteRule exampletest/(.*)$ http://www.exampletest.com/$1 [R=301,L]
Please note that you add this line in the .htaccess file placed on differenturl.com server.
Hope that helps.
Cheers

Is possible to hide a .dll extension in a url

I'm looking for a trick to hide the .dll extension of an isapi dll in an url. I don't know if this is possible. but I preffer to hide it.
Example
www.mysite.com/test/myapp.dll/testfunction
would be
www.mysite.com/test/myapp/testfunction
Thank you very much
You may change the link on page to say ww.mysite.com/test/myapp/testfunction and use the following config with ISAPI_Rewrite 3:
RewriteBase/
RewriteRule ^test/myapp/testfunction$ /test/myapp.dll/testfunction [NC,L]
You can write ISAPI filter and change the URI as you like. There are, of course, ready commercial and free ones
This link may be of use
EDIT: The link above is actually confusing as I don't think it solves the problem at hand.
These two links
this One requires some coding,
this One requires some IIS Setup
In IIRF, a free URL rewriter for IIS5/6/7, you can do this:
RewriteRule ^/test/([^/]+)/([^/]+)$ /test/$1.dll/$2 [I,L]
This rule has wild-card matching on the DLL name and function.
Lots more possibilities, too.

Resources