Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Directory-level configuration file found mostly on Apache web servers
4
votes
Accepted
Is there any way to debug redirection rules in.htaccess?
Use RewriteLog and RewriteLogLevel directives to log such activity (IIS restart most likely will be required).
The higher value you put for RewriteLogLevel the more verbose/detailed it will be.
If …
3
votes
Accepted
RedirectMatch in .htaccess not working
1) Why would you use RedirectMatch directive (from mod_alias) when you already have more powerful RewriteRule directives (mod_rewrite) in place? Why mix them up?
2) In any case -- your RedirectMatch …
1
vote
Accepted
htaccess Rewrite Syntax?
This does work fine here:
# Some options that _may_ be required for rewrite to work
# (depends on hosting/server configuration)
Options +FollowSymLinks +SymLinksIfOwnerMatch -MultiViews
# Activate R …
2
votes
Accepted
.htaccess rule to redirect from 404 to search results
The variable replacement will not work in ErrorDocument directive -- it will pass URL as is with no changes (maybe there are some special module that will perform such replacement -- I do not know).
…
8
votes
Accepted
.htaccess RewriteRule $1 contains wrong value
Your pattern ([^/]+)/?$ will match fred as well as index.php.
The key here -- the way how [L] flag works. After initial rewrite of fred occurs it goes to next rewrite iteration, where it will rewrite …
1
vote
Accepted
.htaccess 301 rewrite rule not working
1. Try adding [L] flag next to R=301 -- right now redirect will not occur straight away and URL gets processed by other rules (the WordPress block). The L flag in conjunction with R=3xx tells Apache t …
2
votes
Accepted
Redirect does not work
1. Why do you need RewriteCond here that does absolutely nothing?
2. Target URL should be just normal link -- no need to escape all non-alphabet characters like you do \:\/\/.
3. That directive requ …
11
votes
Accepted
How to redirect / convert any URL to lowercase?
To implement such redirect using mod_rewrite and .htaccess you need to use RewriteMap directive which cannot be placed in .htaccess -- only in server config / VirtualHost context. … Place this in your .htaccess:
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule . …
5
votes
Accepted
Having trouble redirecting old product sites and categories to new pages
Considering that this .htaccess is located in /prestashop/ folder, the rule may need some slight tweaking (like providing full URL in RewriteRule target, e.g. …
1
vote
Accepted
Htaccess 404 & 301
Use RedirectMatch directive instead. Redirect does strict string comparison while RedirectMatch uses regular expressions and therefore can be "dynamic".
RedirectMatch 301 /roh/z1/q2lvl[1-9].html htt …
4
votes
Accepted
Setting up a redirect from 'www.example.com' to 'www.mysite.com/blog'
.*) http://mysite.com/blog/$1 [R=301,L]
Any of these rules should be place in .htaccess in website root folder on www.example.com site and placed before WordPress rewrite block. …
3
votes
Read data from a folder in main domain folder (CPanel\WHM)
If it is necessary to be done with .htaccess and mod_rewrite, then here are the rules:
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ! … .*) /folder/$1 [L]
For the above to work you need to:
place this into .htaccess file in website root folder;
have mod_rewrite enabled on your server;
.htaccess is enabled in server config and allowed …
5
votes
Accepted
SEO - which URL's are the best?
No difference from SEO perspective. But may be an issue for some people's minds: "Pfew, stone-age html"
No difference at all.
This approach is also used on this site - try for yourself. The importa …
3
votes
Accepted
ISAPI_Rewrite and asp.net events upon postback
You can add this condition RewriteCond %{REQUEST_METHOD} ^GET$ just before rewrite rule to redirect only on GET requests:
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteRule ^default.aspx$ / [NC,R=301,L] …
2
votes
Accepted
product in multiple categories - duplicate content problem
You need to use <link rel="canonical" href="YOUR_URL" /> to tell Google and other search engines what is the most ideal URL for this content.
Official docs:
http://googlewebmastercentral.blogspot.c …