Hi There,
I want to redirect users from a URL formatted like this:
http://blog.mysite.com/any/number/of/directories/<POSTNAME>.html
TO:
http://mysite.com/about/blog/entry/<POSTNAME>/
Where is the same hyphen-separated string, and, the original URL can have any number of directories before the filename (none of which a...
I posted a question the other day about how to change the displayed URL on a Wordpress-generated page, specifically from something like "mysite.com/?cat=3" to just "mysite.com". I got a few replies that steered me towards doing some type of redirect with .htacess. After some research and experimentation, I realized that it's not so muc...
I have drupal installed in my website root with a directory called xi-admin underneath it, that directory has a .htaccess inside doing password protection. problem is, is that it is rewriting http://www.example.com/xi-admin/ back to index.php????
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUE...
In reference to the accepted answer in http://stackoverflow.com/questions/3464141/php-website-to-aspx-net-website. Creating a new post since that post was over-loaded with comments.
.htaccess file
AddType application/x-httpd-php .aspx
AllowOverride AuthConfig in apache config file.
trying to parse php in the aspx page.
index.html / ...
I'd like an htaccess file that would redirect all pages to my index.php so that I can then parse the url and handle the rest. I just don't know how to write it.
thanks
...
This is my .htaccess, and I'd like to rewrite my domain.com to www.domain.com. How can i do this?
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|xml|txt)$
RewriteCond %{REQUEST_URI} !example/
RewriteRule ^(.*)$ index.php?q=$1 [QSA]
Thanks
...
Hi!
I am working on a very dynamic system where i have two identical htaccess files in / and in /somepath. The reason for this that the domain could be pointed into /somepath, but i never know if it is.
When it is pointed to /somepath there are no problems, but when its not it seems like when i request /somepath/page/foo/bar the htacc...
Hi all,
I would like to use following RESTful URL for a web site I'm working on.
http://mysite.com/Products/category=bags&colours=black
can anyone please tell me how to achieve this with .htaccess?
Oscar
...
We are moving from one site language/CMS (coldfusion/custom) to another (PHP/Drupal) and need to have some of our old pages redirected to new ones. I have access to both the .htaccess and httpd.conf (and apache2.conf) as this is a vps on Linode.
Most of them cannot be done via regular expression (they contain GUIDs in the URL) and we're...
I wasn't sure what the title should be but its s simple concept but I'm useless with .htaccess rewrites.
I currently have:
RewriteRule ^([a-zA-z0-9_-]+)/?$ index.php?page=$1
which will happily send all requests to my index and I can do what I want.
I have:
RewriteRule ^events/([a-zA-Z0-9-./]+)/?$ index.php?page=events/index&id=$1
...
Hello,
i'm having a small problem here.
I'm using a simple rule to redirect all requests to a script, excepts some folders with static content :
RewriteEngine On
RewriteCond $1 !^(templates|css|js|uploads)/(.*)$
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]
Most of the time, the redirection is good and transparent.
But if the folder mat...
I'm playing with this combine.php file and it looks nice, but I'm wondering if there is a work around for my problem.
I now have fewer script and link tags for my resources that look and work like they're supposed to
<script type="text/javascript" src="http://path/to/server/javascript/libjs/jqueryui/1.8/development-bundle/ui/minified/j...
I have a website which has .htaccess rewrite rules. And alot of them.
This means for example that
www.mydomain.com/classifieds/something_very_very_very_very_Very_very_looong.php?id=12345
becomes
www.mydomain.com/classifieds/12345
Now, this might be a stupid question, but I must be sure...
I have followed several guide...
So I'm working on a CSS/JS compressing system for a site, that has basically the following htaccess
RewriteEngine On
...
RewriteRule ^css/images/(.*)$ images/site/$1?%{QUERY_STRING} [L]
RewriteRule ^css/([0-9a-fA-F]{32})$ assets.php?hash=$1 [L]
RewriteCond %{HTTP_HOST} ^www.site.com [NC]
RewriteRule ^(.*)$ http://site.com/$1 [L,R=301...
Hello,
My htaccess have this code
#
# Apache/PHP settings:
#
Options -Indexes
Options +FollowSymLinks
**# NOT WORKING #
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?yourwebdomain.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www.)?friend1domain.com(/)?.*$ [NC]
RewriteCond %{HTTP...
Hi,
I have two domain: asdf.com and asdf.ru (.ru is a parked domain). They are pointing to the same folder on the server. (Everything is the same, the only difference is the language). I cannot use subdirectories.
Is it possible to protect the .ru domain with password, but leave unprotected the .com domain?
Thank you.
...
Hi!
I have some magic stuff in my htaccess. It works very well but I don't know how
RewriteRule ^[^_+/]. index.php
I think it says that all requests should go through index.php no matter which directory the visitor ask for. So far so good. However images, css files, js files etc should of course not be parsed in index.php. Can I ex...
Having a weird problem.
I have two sites, first is www.example.com/folder/site1/, second is www.example.com/folder/site2/.
The problem I have is that my .htaccess code is only working on site1, why?
My .htaccess code looks like this:
RewriteEngine On
RewriteBase /folder/site1/
# Do not enable rewriting for files or directories that ...
I am trying to redirect a single URL in a .htaccess file with Redirect:
Redirect 301 /index2.php?option=com_rss&feed=RSS2.0&no_html=1 /something/somethingelse/
I have a bunch of other similar rules which work using directory structure URLs, but this one refuses to get processed.
Redirect 301 /old/url/ /new/url/
Do I have to do anyt...
My website structure has a root /index.php, some files as /directory/index.php and some as /directory/(filename).php
I have the following .htaccess which removes the php extensions and the "index.php" for my URLs, and forces trailing slashes on the first level directories for SEO goodness:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCon...