I'm trying to redirect all pages and subdomains by preceeding them with a m. subdomain unless it starts with a m. yet it completely fails. where am I going wrong?
example.com or www.example.com -> m.example.com
test.example.com -> m.test.example.com
images.example.com -> m.images.example.com
m.example.com -> Don't redirect
m.test.exampl...
Is it possible to reference a full/absolute path directory, such as /usr/home/public_html/x in .htaccess mod_rewrite?
I've tried the most obvious case of putting the following in the .htaccess of a subdomain (stored in a folder in public_html), hoping it'd map (not redirect!) onto the file as pointed by the absolute directory:
RewriteE...
I have several websites that I use a subdomain as part of the main url.
subdomain.domain.com
When someone enters www.subdomain.domain.com they get an error, I want to redirect that to subdomain.domain.com.
Thanks in advance!
...
hi i want something like this
when user write www.test.com/6
in the behind it will go to http://www.test.com/index.php?id=6
but this is not redirection it will be mod_rewrite
i do something like this but i get internal server error
Options +FollowSymLinks
RewriteEngine on
RewriteRule ([0-9]*)$ /index.php?id=$1 [L,NC]
...
hi
i want to redirect test.com/8/ to test.com/8
the number section is not fixed, so i need something includes [0-9]*...
...
Hi all,
I have a .htaccess file & I currently I am working on localhost. For a 404 page error, I have the following code in the .htaccess file:
ErrorDocument 404 /my_local_domain/404.php
But when I upload this file to my website online, the functionality of the file breaks. It no longer shows the 404.php page. It works if I modify the...
I have the following:
RewriteEngine On
# Check if the host name contains a . (localhost won't)
# Check if the host name starts with www
# Check if the host name ends with .com
# Check if the connection is secure
RewriteCond %{HTTP_HOST} \.
RewriteCond %{HTTP_HOST} !^www [OR]
RwriteCond %{HTTP_HOST} !\.com$ [OR]
RewriteCond %{HTTPS}...
Hello,
Can you help me solve this problem, please.
In my .htaccess file I used this rewrite rule:
rewriteRule ^country/([0-9]+)/([0-9]+)/([0-9]+)/(.*)/(.*)?$ search.php?loc1=$1&loc2=$2&loc3=$3 [L]
To get this kind of urls:
/country/13/196/2693/germany/frankfurt
Everything works fine, but I get unwanted duplicate URLs also:
/...
Hi,
I want to redirect every post 301 redirect, but I have over 3000 posts.
If I list
Redirect permanent /blog/2010/07/post.html http://new.blog.com/2010/07/23/post/
Redirect permanent /blog/2010/07/post1.html http://new.blog.com/2010/07/24/post1/
Redirect permanent /blog/2010/07/post2.html http://new.blog.com/2010/07/25/post2/
Redir...
I'm using a multisite setup in subfolders, everything words fine except the non-www to www redirection.
I got it working with no issues for the main domain, but I cant get it to work for the other sites:
for example , I want this redirection :
site.com/ru > www.site.com/ru
...
I have setup htpasswd authentication on my live site and it works great, but I don't want to be asked for a password when I am working on the development environment.
In my httpd.conf file I have:
SetEnv APP_ENV "development"
In my .htaccess file I have:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /path/to/file/.htpasswd
...
Is there a way to allow foreign characters in .htaccess mod_rewrite character sets? i.e., a way to add foreign characters like ç and others to ([A-z]+) ?
...
Hello,
I need some help. I have a page at /register. However, I also want to be able to view this register page at /book-your-place-now. I know that is possible with .htaccess but I cannot for the live of me get me head around .htaccess files.
...
I'm currently moving a dev magento build to my live test subdomain on ubuntu and using Easy Hosting Control Panel (EHCP).
If I rename my .htaccess file to .htaccess and refresh my subdomain url, I get an internal server error 500. If I rename the .htaccess file to .htaccess.bak, and refresh, the subdomain displays my magento store fine....
I'm trying to implement the Twin Helix PNG transparency issue in IE6 but when I downloaded the zip file the htaccess file is empty. Does anyone know what should be inside the file in order to complete the fix?
Thanks in advance!
...
I understand how to ban an IPs address from my apache webserver using .htaccess:
order allow,deny
deny from 192.168.44.201
deny from 224.39.163.12
deny from 172.16.7.92
allow from all
I'd like to create a custom "You've been banned" page. How could I do this?
EDIT:
To clarify, I am not trying to create a custom 403 page, as these ar...
I am creating a PHP based web application which requires simple authentication to use. The application is made to be installed on a web server and used only be the owner of the web hosting/server, so there will only be one user and password. I figured there was no point in creating a complicated login system. I would just create a GUI to...
I'm using Wordpress with a plugin and it's currently making urls like this: http://www.example.com/?name=the-office
I would like to redirect all similar urls to http://www.example.com/name/the-office
Current htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCo...
I have the following URLs:
www.mydomain.com/client
www.mydomain.com/client/index.php
www.mydomain.com/client/index.php?a=b
www.mydomain.com/client/index.php?a=b&b=c
The following two htaccess files exist:
www.mydomain.com/.htaccess
www.mydomain.com/client/.htaccess
I want to edit "www.mydomain.com/client/.htaccess" so that if you...
I am working on a large project that involves taking thousands (30,000+) static web pages and turning it into to a CMS.
The issue is many of these pages are duplicates within their directories. I want to keep the SEO intact by using 301 redirects, however, I am not sure how to go about doing such a large redirect (301).
Here is an exam...