I just recently migrated from a linux host to a dedicated server with windows 2003, I had only one site using Mod_rewrite, but with ISAPI _Rewrite 3 free, the rules are global.
How do I write a condition to affect only "mysite.com" and not the others?
this is my httpd.conf file
# Helicon ISAPI_Rewrite configuration file
# Version 3.1....
Are these url rewrite rules and conditions correct?
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Basically, URL needs to be rewritten from non-www to www.
Thanks
...
Hi There
I am trying to find the best way of displaying content that resides under a different server location.
So I have a domain where have the main site content is located at:
/home/user/my_site/www/
and accessed at:
www.example.com
I have another site (a blog) located at:
/home/user/the_blog/www/
I wish to get the blog co...
Hi,
I have a website with around 500 html pages. I have now posted all these html pages into my blog as blog posts. I now want to now redirect users from the page to the blog. I could do that using mod_rewrite or JavaScript
Since Google will re-index these posts, which of the these two methods would be a better option for SEO?
Kindly ...
I am trying to get my old paging class to work which relied on the variables available with $_GET in PHP to reconstruct the URL for the paging links, it worked great but now I am changing to have "pretty url's" with mod-rewrite.
So this
domain.com/?p=the-pagename-identifier&userid=12&page=3
would now be
domain.com/the-pagenam...
I'm trying to use mod_rewrite to redirect URLs and can't get anything to work. Here is what I'm hoping to do:
Old URL:
http://www.example.com/asp.pl?%5Fpuri=astore.amazon.com%2Fthegi02-20%2Fdetail%2FB0001L0DFA%2Fassid
Needs to redirect to:
www.example.com
Anyone know of any way to do that?
...
How do you remove a folder from the URL?
I have a Drupal installation in a folder and I would like to remove that subfolder from the URL.
So instead of:
www.example.com/subfolder/*
I would like the url to be:
www.example.com/*
thanks
...
I am building an app in Zend Framework at the moment and testing it all locally. I have Mamp Pro as my web server and I have a self-signed SSL which all seems to work. My problem comes when I try to do mod_rewrite - I just get 404 pages.
The way I have things set up (which may not be the best way...)
In Mamp I have 2 virtualhosts set...
Hey guys, here's what I'm attempting:
I'd like to make it so I can turn all url variables and values into folders, all with one rule. I was expecting to find some way to do this:
www.example.com/var1/val1/var2/val2/varN/valN
In an ideal world I could get rewrite to this:
www.example.com/index.php?var1=val1&var2=val2&varN=valN...
I'm trying to modify the following rewrite conditions so that only strings that begin with the number 4 are redirected to the process.php page as a variable:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ /process.php?variable=$1 [L]
So the following
http://www.domain.com/4shopping
wil...
The following rewrite passes a string starting with the number 4 as a variable to process.php :
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(4[^/]*)$ /process.php?variable=$1 [L]
So this
http://www.domain.com/4shopping
is mapped to
http://www.domain.com/process.php?variable=4shopping
But...
Hi,
I am looking to use Apache mod_rewrite to serve a file as .jpg instead of .jpeg. Is this possible?
...
I just recently ported over my source code to Ubuntu Server from Windows and I've been having a few .htaccess mod_rewrite problems. I have mod_rewrite enabled for Apache. Here is my current .htaccess
RewriteEngine On
RewriteRule ^css/default/?$ css/default.css
RewriteRule ^user/?$ user.php
RewriteRule ^user/([A-Za-z0-9_]+)/?$ user.ph...
Is there a way how I can configure the Apache web server to return a 404 (not found) error code instead of 403 (forbidden) for some specific directories which I want to disallow to be accessed?
I found some solutions suggesting the use of mod_rewrite, like e.g.
RewriteEngine On
RewriteRule ^.*$ /404 [L]
As the purpose of sending 404 ...
I have a page called category.php5 that uses $_GET["category"] to fetch the right content from the database. I want to pretty it up so is looks like:
sinaesthesia.co.uk/category/psoriasis
which would equal:
sinaesthesia.co.uk/category.php5?category=psoriasis
I have successfully done this sort of rewriting before, but since I can't ge...
I have a website and want to redirect all its pages to posts on my blog. I browsed through my website folder but could not find the '.htaccess' file. Is it provided by the web hosting or can I create my own and use it? Can it be only used with Apache server.
If that's not possible what other option do I have for redirection.
Janice
...
I am trying to mod-rewrite based on a sub-domain. How do I take the subdomain and append it to the end of my new domain?
Example:
RewriteCond %{HTTP_HOST} ^users\.example\.com$
RewriteRule ^(.*)$ http://www.example.com/?subdomain=[variable for sub] [L]
How do I get 'users' into [variable for sub]?
...
I have a need to mod-rewrite my domain based off of subdomains...there are two scenarios in which i would need to do this:
my site is located in different cities...so losangeles.example.com should localized to los angeles, etc...essentially rewritten to www.example.com/?loc=losangeles
i want to allow users to create username.example.co...
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^((app_.*?)|models|plugins|jig) - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>
Above is my .htaccess file... and index.php is logging each request. When I check my logs, I get ...
Hi.
In my root web folder I have a list of folders (files, modules, classes) that I'm using .htaccess to prevent access to. However, in the modules/ folder, there are modules that carry their own images, which I'd like to allow access to.
How do I allow access to images in a folder under modules/, but still prevent accessing any other ...