It's not now. Empty your cache. RewriteEngine on RewriteCond %{HTTP_HOST} ^nixism\.com [NC] RewriteRule ^(.*)$ http://www.nixism.com/$1 [R=301,L]
Is it a good code with this one? Options Indexes +FollowSymLinks Includes +ExecCGI RewriteEngine on RewriteCond %{HTTP_HOST} ^site\.com RewriteRule ^(.*)$ http://www.site.com/$1 [R=permanent,L] And is it better to change it directly in apache for google ex: Apache as follows: for "site.com": Redirect permanent / http://www.site.com/ or to do it in .htaccess ? Bobby
Here is my .htaccess file: However this rule apparently redirects anything to index.php, even capital letters and symbols... What did I do wrong?
Ah... so this is the only thread where Nintendo replies... I was wondering why he seems to ignore other threads requesting similar help
I'm trying to redirect ANY request that contains only lowercase letters, numbers, and / or the characters: to /index.php For example: example.com/foo/bar-3.0 would be redirected, example.com/foO/bar-3.0 would not be. But this: ^[a-z0-9\./-]+$ Code (markup): seems to match any string, as far as I can tell... what did I do wrong? [edit] Ok, it looks like the problem is in this part: \. Code (markup): If I remove that it works (except if there is a '.' in the URL obviously), so it appears that the '.' isn't getting escaped like I thought it was- how do I escape special characters then?
Afaik, within the [] notation, you do not need to escape metacharacters - other than the obvious ones that could be confused ([ ] and possibly -, depending on position). Have you tried without escaping the period? I can't imagine why still escaping it anyway should cause problems but other than it looks perfect.
I have searched the forum but i didnt find the answer maybe i didnt search very good. Sorry if this question posted again. I want to redirect my vbulletin forum from a dir www.domain.com/vbulletin to www.domain.com Can i do that with mod_rewrite? Thanks coby
Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase / RewriteRule ^vbulletin/(.*)$ http://www.domain.com/$1 [R=301,L]
Thanks for your help, I removed the backslash that was escaping it but still no luck (Expression: ^[a-z0-9/.-]+$ ).
Thanks Nintendo! I tried this one but it didnt work. Where do i have to put this one? On root or in subdir? Also i have an index.html which does the automatic redirection to the /vbulletin dir on root. Is this causing any problems? After some thinking... I realised that my completed question would be: How can i create permanent redirection to the vbulletin dir and rewriting the url showing only the domain name using .htaccess? I have to say that i tried permanent redirection from a tutorial using htaccess but after that all my addon domains on server stopped working, so i used index.html...
domain.com/.htaccess for just taking vbulletin/ out of the URL. Is the index.html using meta redirect in the file? That wouldn't effect it.
why is the number giving me trouble? RewriteRule ^dictionary-3.html http://www.hellhorror.com/demonology.html [L,R=301] but RewriteRule ^dictionary-.html http://www.hellhorror.com/demonology.html [L,R=301] WORKS!! Something wrong with the 3 RewriteRule ^dictionary-3.html http://www.hellhorror.com/demonology.html [L,R=301]
Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase / RewriteRule ^dictionary\-3\.html$ http://www.hellhorror.com/demonology.html [R=301,L]
Same prob RewriteRule ^dictionary\-3\.html$ http://www.hellhorror.com/demonology.html [R=301,L] DOES NOT WORK BUT RewriteRule ^dictionary\-\.html$ http://www.hellhorror.com/demonology.html [R=301,L] DOES WORK That stupid numeral 3 Any other option to maybe escape it or something??
I created it in the root but nothing happened... When i load the site www.domain.com the page starts reloading with no output. Maybe its the index.html file that has the redirection on meta.(as you mentioned) I deleted the index.html on root to see what happens and i saw the index of my server. I clicked on some dirs but reloads on the root. Whats wrong? Can we fix this? Thanks.
Hi Nintendo, It seems when I use more than 9 parameters at my RewriteRule, the server confuses and refers $10 as to $1 and a zero afterward, and for $11 as $1 and 1 afterward So if $1 gets "hi" value,$10 would become "hi0" is there a way overcoming this problem?
I've enver tried having more than nine, so I'm not sure why it does that. Do you have it like whatever.php?wacko=$1&more=$2&soon=$3 or whatever.php?$1=$2&$3=$4&$5=$6 ?