url-rewriting

Joomla getting Variables passed in URL

那年仲夏 提交于 2021-02-16 19:06:29
问题 I am trying to pull values from a URL string in Joomla when they are passed into our site. an example is: ?source=SEARCH%20&utm_source=google&utm_medium=cpc&utm_term=&utm_content={creative}&utm_campaign=&cpao=111&cpca=&cpag=&kw= so out of this I will want the VAR=utm_source grabbed, utm_medium grabbed etc. I want to carry these values across the sites and held at least until the visitor hits submit on a form so these values will be passed with the form to track these areas to see where they

Joomla getting Variables passed in URL

让人想犯罪 __ 提交于 2021-02-16 19:06:17
问题 I am trying to pull values from a URL string in Joomla when they are passed into our site. an example is: ?source=SEARCH%20&utm_source=google&utm_medium=cpc&utm_term=&utm_content={creative}&utm_campaign=&cpao=111&cpca=&cpag=&kw= so out of this I will want the VAR=utm_source grabbed, utm_medium grabbed etc. I want to carry these values across the sites and held at least until the visitor hits submit on a form so these values will be passed with the form to track these areas to see where they

IIS 7 - Rewrite rule not firing, but does work with Redirect

风流意气都作罢 提交于 2021-02-11 17:58:29
问题 I have the following rewrite rule set up on IIS 7: <rule name="Rewrite /publicfiles/GUID/file.ext" stopProcessing="true"> <match url="^/?publicfiles/(.*)/(.*)" /> <action type="Rewrite" url="http://www.domain.tld" appendQueryString="false" / </rule> When I try it out it appears to not fire. I get a 404 error, but if I change the type to Redirect it fires and sends me to the URL specified. Is someone able to shed some light on this? EDIT: I added the definition of the rule to the web.config of

URL Rewrite rule - subfolder to query string value

走远了吗. 提交于 2021-02-11 15:01:36
问题 I'm trying to create a rule the will take the subfolder from the URL and convert that to a query string value for example: If I navigated to this URL: http://www.example.com/myfolder I would like that to read http://www.example.com/default.aspx?folder=myfolder This is where I'm up to: <rule name="Rewrite Language"> <match url="([a-z]{2})(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType

URL Rewrite rule - subfolder to query string value

戏子无情 提交于 2021-02-11 14:59:25
问题 I'm trying to create a rule the will take the subfolder from the URL and convert that to a query string value for example: If I navigated to this URL: http://www.example.com/myfolder I would like that to read http://www.example.com/default.aspx?folder=myfolder This is where I'm up to: <rule name="Rewrite Language"> <match url="([a-z]{2})(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType

IIS URLRewrite https non-www to https-www

纵饮孤独 提交于 2021-02-11 12:32:04
问题 Having a tough time configuring rewrite rules. I basically want : Non www requests to be redirected to one with www Non https requests should be redirected to one with https Desired Redirects: Requested Url Redirected To http://example.com https://www.example.com/ http://www.example.com https://www.example.com/ https://example.com https://www.example.com/ https://www.example.com https://www.example.com/ Rewrite configuration 1: <rules> <rule name="Redirect HTTP to HTTPS" stopProcessing="true"

Replace URL segment hyphens with spaces using htaccess rewrite rules

杀马特。学长 韩版系。学妹 提交于 2021-02-11 06:19:44
问题 I have a friendly URL as follows: www.dominio.com.br/cidade/sao-paulo And here's my htaccess rewrite rule: RewriteRule ^cidade/(.*)$ busca-cidade.php?cidade=$1 And the SQL query: Select * from cidades where cidade = 'sao-paulo' Is it possible to replace the hyphens with spaces using htaccess and rewrite rules? So the friendly URL will be mapped to: www.dominio.com.br/busca-cidade.php?cidade=sao%20paulo This finished my code, was great, would give to optimize. #################################

Strange Nginx behavior with trailing slashes

只愿长相守 提交于 2021-02-10 18:51:54
问题 I've got a quite interesting behavior. I want to avoid trailing slashes in URL's on my site. I've put rewrite ^/(.*)/$ /$1 permanent; rule into my server block, so https://example.com/something/ , https://example.com/something//// redirect to https://example.com/something ; and https://example.com/ redirects to https://example.com But https://example.com//// is redirected to ... https://enjoygifts.ru//// (actually don't redirected, it's 200 code). Why? Here is my server block: server { listen

.htaccess rewriting PATH_INFO vars to empty before passing to template; not removing index.php from url

旧巷老猫 提交于 2021-02-10 17:50:44
问题 Morning everyone, I'm hoping this will be an easy one! (I haven't even had coffee yet why am I up so early?!) Anyway.. got a two-parter for you: First (basic) issue that I'm trying to remove index.php from my links (which seems to be next to impossible thanks hostgator :) ). After a bunch of searching I've gotten to the point where /page redirects to /index.php/page. Now this is better than nothing, but of course still not ideal. And I had to use [R] to do it. My .htaccess is: RewriteCond %

Directing Non-Slash URL to Slash

☆樱花仙子☆ 提交于 2021-02-10 11:12:14
问题 When I enter the website.com/seo link, I want to make a 301 redirect to the website.com/seo/ link. However, I don't want it to be broken in the codes I wrote in the current htaccess. my htacces codes: RewriteEngine On RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC] RewriteRule ^ %1/ [R=301,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*?)/?$ $1.php [NC,L] 回答1: Use only one of these, do not use together! Try: RewriteEngine