Google Analytics: Exclude URL Query Parameters when using URL rewrite - url-rewriting

I need to exclude some parameters to aggregate properly the pages of my website. I know there is "Exclude URL Query Parameters" and that's OK.
The problem is when I use the URL rewrite. Example.
I have tried with a custom filter for renaming URLs, but it seems to be ignored.
Can anyone help me with the correct syntax?
Please, see this screenshot:

I doubt any of your URIs start with "fbphoto" (^fbphoto). "/fbphoto" is more likely (^/fbphoto)
If the intent is to rewrite all photo URLs with /fbphoto/, here's the syntax to use:
Search String:
^/fbphoto.*
Replace String:
/fbphoto/

Related

Changing domains in IIS environment

I am working with IIS (Internet Information Services ) in a windows server with URL Rewrite.
Need to redirect a URL (https://page.olddomain.com) to a new URL (https://page.newdomain.com). Everything remains the same, just need to URL to change if a user goes to https://page.olddomain.com.
Wondering if I'm following the right process of thought here.
I have a Inbound Rule created that should work.
Match URL
Requested URL: Matches the Pattern Using: Exact Match Pattern:
https ://page.olddomain.com (ignore case)
No conditions set
No server variables
Action
Action Type: Rewrite
Action Properties
Rewrite URL: https://page.newdomain.com
Append query string: checked
Am I missing anything here?
For this problem, if you can't implement the redirect step, I think it was caused by the wrong input in Pattern box which same with the comment mentioned by Lex Li.
We do not need to input the base url(such as https://page.olddomain.com) in Pattern, we just need to input the append url after the base url in Pattern. For your requirement, you just need to do it as below screenshot:
I suggest you to use "Regular Expressions" instead of "Exact Match", it can success implement your requirement.
And by the way, maybe you want to input / in Pattern(just ignore baseurl), but it will not work. So please input .* in Pattern. Apart from this, you'd better also define a condition to specify the HTTP_HOST equal your old host url.
For the comment you mentioned about SSL, I think it will not be affected by the redirect/rewrite rule.

appending query string with Sitecore URL Rewrite module

I am trying to rewrite incoming URL requests with the Sitecore URL Rewrite module in Sitecore 9. The request come in with the format of www.site.com/find-location/locations/1111 but the current service requires the format to be www.site.com/find-location/locations/?id=1111. I have tried applying the query string of "id=1111" to the Sitecore link and selecting Append query string in the redirect item but the query string is never applied. The inbound rule works correctly as I can set it to point to a specific page without a query string and it will redirect to that page but will not apply a query string. Is there something that I am missing or is there a better way to accomplish this?
I found the solution by setting the redirect link as an external link and giving it the query string ?id={R:1} which is the matched pattern.

Google search appliance GSA URL regarding to suggestion

I'm facing some problem regarding to query hit for generating suggestion.
Please take a look below URL structure and suggest the appropriate URL modification.
http://{host-name}/search?start=0&num=1000&site=bhtest&output=xml&client=pp_frontend&filter=0&getfields=*&q=sken+inmeta:contenttype~Product%20OR%20inmeta:contenttype~Content
In the above query, search term is "sken", GSA suggestion tag should appear and provide suggestion for "skin" but it is not happening
When I change the query to:
http://{host-name}/search?start=0&num=1000&site=bhtest&output=xml&client=pp_frontend&filter=0&getfields=*&q=sken
Then it provides the suggestions.
Can you please help to find out the problem in first one URL.
Suggestions are not returned when you add metadata filters. See the search protocol reference found here
The way to work around this is to issue two queries, one with your filter and one without.
It is related to language parameter in my oppinion. Try use &lr and &hl parameters. GSA suggest by this parameters.

Codeigniter URL routing solution for my website

I have a website that is developed with CodeIgniter. I have added the route for my url as follows:
$route['about_us'] = 'about-us';
Now I have a problem with that. I.e. when I am looking for the url www.mysite.com/about_us it works and at same time www.mysite.com/about-us is also working. I want only one url to work: the one with the underscore.
I have removed this to:
$route['about_us'] = 'about-us';
But the url www.mysite.com/about-us still works. It may cause duplicate content for my website in Google and so more page links also showing. Even I don't have that functions too. Like www.mysite.com/about_us/design. Likewise in about_us controller file index function only there, but design method calling in Google.
How do I resolve this problem?
You actually don't need a route here. The normal purpose of request routing the way you are using it is so that you can use hyphenated URLs when hyphens are not permitted in class and function names. I.E. you want the url to by www.example.com/test-controller, but you can't actually name a controller test-controller because the hyphen is illegal.
If you only want to have the underscored URL such as www.mysite.com/about_us then just remove the route completely and name the controller about_us. With no routing rules the hyphenated url should 404.

Can CodeIgniter route custom URLs?

I am trying to get pretty URLs on Codeigniter. Basically, here’s what I want.
//http://website.com/State/City/Neighborhood/Zip => http://website.com/search?lotsofParams=1234
$route['/State/City/Neighborhood/Zip'] = "search?location=blahblahblah&Submit=Search";
I am willing to write the routes manually, but right now that code isn’t working. Any idea how I can get this working?
no you are using QUERY STRINGS you can't route query string to friendly slashed urls.
You can re-write them with htaccess

Resources