.htaccess

TYPO3 breaks urls without WWW

末鹿安然 提交于 2020-02-25 05:58:04
问题 The problem is that when I want to access my website like www.example.com/my/subpage all works great but when I try to access my website like this (without WWW) example.com/my/subpage TYPO3 breaks it down and redirect it to www.example.com/index.php/subpage . The redirect from non WWW to WWW is correct but why does it destroy my url? Here is the .htaccess redirect: RewriteCond %{HTTP_HOST} !^www\.example\.com$ RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] For the "nice" urls I use

How to rewrite URL by Htaccess with basic parameters in core PHP

人走茶凉 提交于 2020-02-25 04:22:06
问题 Hello all i am having a issue with this URL rewrite. my current URL is like this domain.com/professional?seo=ACCOUNTIFY-SERVICES-&-ADVISORS&id=3173 here the page name professional can be changed to any page like i will have the similer url with other page names. Desired URL domain.com/professional/ACCOUNTIFY-SERVICES-&-ADVISORS/3173 i know that i can do this by htaccess for sure here is my htaccess file RewriteEngine On RewriteBase / Options All -Indexes RewriteCond %{REQUEST_METHOD} POST [NC

How to rewrite URL by Htaccess with basic parameters in core PHP

不羁岁月 提交于 2020-02-25 04:22:06
问题 Hello all i am having a issue with this URL rewrite. my current URL is like this domain.com/professional?seo=ACCOUNTIFY-SERVICES-&-ADVISORS&id=3173 here the page name professional can be changed to any page like i will have the similer url with other page names. Desired URL domain.com/professional/ACCOUNTIFY-SERVICES-&-ADVISORS/3173 i know that i can do this by htaccess for sure here is my htaccess file RewriteEngine On RewriteBase / Options All -Indexes RewriteCond %{REQUEST_METHOD} POST [NC

htaccess rewrite rule, old URL to new

此生再无相见时 提交于 2020-02-23 08:39:08
问题 A bit of help fellow SO people. What I have at the moment (based on some code I used for a different type of URL). I want the first URL to redirect to the second, with no query string included afterwards This is what I have to so far. RewriteRule ^(page.php?id=missionstatement+)/?$ http://example.com/why/mission-statement [R=301,L] RewriteRule ^(page.php?id=ofsted+)/?$ http://example.com/how/ofsted-report [R=301,L] RewriteRule ^(page.php?id=governingbody+)/?$ http://example.com/governors [R

htaccess: redirect all requests to different domain (without query arguments)

雨燕双飞 提交于 2020-02-20 06:58:32
问题 How can I redirect all requests (irrespective of what page is being requested) on sub.domain.com to newdomain.com? Currently I have Redirect 301 / http://www.newdomain.com/ When a requests comes in for domain.com/shop/product the redirect goes to newdomain.com/shop/product while it should just go to newdomain.com 回答1: Use Rewrite: RewriteEngine on RewriteRule (.*) http://www.newdomain.com/ [R=301,L] 回答2: RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ RewriteRule (.*) http://www.newdomain

How to set all pages of a subdomain to redirect to a single page?

两盒软妹~` 提交于 2020-02-16 06:26:28
问题 Let's say my domain name is website123.com and I have a subdomain of my.website123.com I've deleted the "my" subdomain from the site and want to make sure that anyone that goes to any page with a my.website123.com URL is redirected to the main www.website123.com URL. The "my" subdomain has a ton of pages of it, so I need to make sure that regardless of which page a user goes to on the "my" subdomain, that they're redirected to the site's main index page. I was thinking to get this

Why does leading slash not match my RewriteRule?

半世苍凉 提交于 2020-02-16 05:27:09
问题 I hope I'm missing something silly. I'm trying to redirect URLs using .htaccess on Apache 2.2 using the PHP 5.4 cartridge on OpenShift's free hosting service. This matches the URI /permalink/a123 (note the lack of leading slash in the rule's filter pattern): RewriteEngine On RewriteRule permalink/a.*$ /permalink/b [R=301,L] This does not match the URI /permalink/a123 (note the leading slash in the rule's filter pattern): RewriteEngine On RewriteRule /permalink/a.*$ /permalink/b [R=301,L] So

Why does leading slash not match my RewriteRule?

人盡茶涼 提交于 2020-02-16 05:26:12
问题 I hope I'm missing something silly. I'm trying to redirect URLs using .htaccess on Apache 2.2 using the PHP 5.4 cartridge on OpenShift's free hosting service. This matches the URI /permalink/a123 (note the lack of leading slash in the rule's filter pattern): RewriteEngine On RewriteRule permalink/a.*$ /permalink/b [R=301,L] This does not match the URI /permalink/a123 (note the leading slash in the rule's filter pattern): RewriteEngine On RewriteRule /permalink/a.*$ /permalink/b [R=301,L] So

regex to match a URL with optional 'www' and protocol

久未见 提交于 2020-02-16 03:53:58
问题 I'm trying to write a regexp. some background info: I am try to see if the REQUEST_URI of my website's URL contains another URL. like these: http://mywebsite.com/ google.com/search=xyz However, the url wont always contain the 'http' or the 'www'. so the pattern should also match strings like: http://mywebsite.com/ yahoo.org/search=xyz http://mywebsite.com/ www.yahoo.org/search=xyz http://mywebsite.com/ msn.co.uk' http://mywebsite.com/ http://msn.co.uk' there are a bunch of regexps out there

regex to match a URL with optional 'www' and protocol

依然范特西╮ 提交于 2020-02-16 03:43:14
问题 I'm trying to write a regexp. some background info: I am try to see if the REQUEST_URI of my website's URL contains another URL. like these: http://mywebsite.com/ google.com/search=xyz However, the url wont always contain the 'http' or the 'www'. so the pattern should also match strings like: http://mywebsite.com/ yahoo.org/search=xyz http://mywebsite.com/ www.yahoo.org/search=xyz http://mywebsite.com/ msn.co.uk' http://mywebsite.com/ http://msn.co.uk' there are a bunch of regexps out there