After a final last ditch attempt, I have found that this seems to be working ...
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteRule ^$ /new-page.html [L]
Can anybody see anything wrong with it?
Is it possible to rewrite the root to a specific page?
I would like the visitor coming to http://www.domain.com to be automatically taken to http://www.domain.com/new-page.html
I have tried various things, but they don't work.
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{HTTP_HOST}...
Thanks for the help Feherke,
The two domains in question do have completely different content, but the styles-sheets give each site a different look and feel so the managing the stylesheets was the quickest way to make a visual difference.
Hi,
We have a website that can be accessed using two different domains names.
Using the .htaccess file, is it possible to deliver a different CSS file depending on which domain name is used to access the website?
I am having difficulty getting this to work...
I have some code that I would like not to display on particular webpages. I have a line of PHP like this:
<?php if ( $_SERVER['REQUEST_URI'] !== "/" ) { ?>
html content
<?php } ?>
This works inasmuch as the HTML content is not displayed on the...
Follow up,
I have this working to redirect all requests apart from "index.html":
RewriteCond $1 !^index\.html$
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^(.*)$ http://sub.domain.com/$1 [R=301,L]
The only part that I have not worked out is...
I have an existing website that will now be moved to a subdomain. I would like to use rewrite rules to redirect all of the requested pages to the subdomain apart from the index.html and requests that come to the website using just the domain name (without index,html)
I have got as far as...
I am using a small script for saving code snippets.
The script saves each snippet in a text file. It is adding escape characters to some of the code:
snippet:
if(strstr($HTTP_ACCEPT_LANGUAGE,"en")) {
and this is how it is saved in the text file:
if(strstr($HTTP_ACCEPT_LANGUAGE,\"en\")) {
How...
Thanks for replying 58sniper,
Are you saying that if my e-mail client was using such a plugin, it would not be able to connect to the Internet and make the checks that you have mentioned?
Why can't the plugin allow the user to input the SMTP server information? Most of the rest of the...
Hi,
Does anybody know of a plugin or tool that can can test my outgoing e-mails for a "spam score" before they are sent?
I use The Bat! e-mail client and the ideal solution would be a small service or plugin that can quickly test my outgoing e-mail and then stop the message from being sent if...
Resolved
This is what I needed to do:
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^10\.20\.30\.40
RewriteRule /.* http://www.otherdomain.com/ [R=301,L]
Is it possible to use the .htaccess file to specify IP addresses that are allowed to access pages, with all others being redirected using the mod_rewrite?
I have tried this (and a number of other combinations) but without success:
order deny,allow
deny from all
Allow from 10.20.30.40...
Hi,
Can anybody advise me whether it is possible to use an "if" statement to style a specific link when it appears on a page?
The link appears like this in the browser's source code:
<li class="level1 item9">
<a href="/br/link.html" class="level1 item9">
<span>Best Link</span>
</a>
</li>
I...
Thanks again jpadie,
I have found the solution using a slightly different technique:
$forminput .= "$_POST[emailtext]";
function extract_emails_from($string){
preg_match_all("/[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i", $string, $matches);
return $matches[0];
}
$text = $forminput;
$emails =...
Hi jpadie,
Thanks for your reply.
In your post above, you have a red open and close bracket either end of the regex - are these to be removed?
And, the [0] - Is this also to be removed?
I replaced my function with the function you supplied and received an error:
"Parse error: syntax error...
First, I hope this is the appropriate board for a RegEx query...
I have a small script that takes the input from a form textarea and tries to extract all of the e-mail addresses. It works very well and the output shows each e-mail address separated with a space.
Can anybody tell me how I can...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.