url-rewriting

Remove trailing slash from real directories

冷暖自知 提交于 2019-12-13 18:27:21
问题 how are you? please one very little question if you don't mind. after the previous episode of redirecting and rewriting rules in this thread: redirect to default language except for /amp/ Urls, our SEO agency recommended us to change the URLs site.com/fr, site.com/be to site.fr and site.be I already set the 301 redirections for old URLs as follow: RewriteRule ^[a-z]{2}$ / [R=301,L] RewriteRule ^[a-z]{2}/(.*)$ /$1 [R=301,L] I know this can be achieved in one rule but didn't manage to make it

Issues Replacing underscores to hyphens with .htaccess

China☆狼群 提交于 2019-12-13 17:47:48
问题 Although I already saw few posts about this thema, I am still having some problems to achieve what I want. My old URL's were like: http://myhostname.com/offer/1234_Nice_Offer_Cool_Whatever_HEllyeah.htm And obviously I want to rewrite them to: http://myhostname.com/offer/1234-nice-offer-cool-whatever-hellyeah.htm This is the code I tried in .htaccess. This works fine to replace the underscores in URL's which they don't have ANY directory: RewriteCond %{REQUEST_URI} \.htm$ [NC] RewriteRule ^([^

Change URL in browser without redirection with htaccess

此生再无相见时 提交于 2019-12-13 17:07:07
问题 I've looked everywhere to find the proper solution/method but I can't seem to find anything that works for me. I even asked friends and they helped but none prevailed. What i'm trying to do is, changing the URL displayed in the browser but only that. (No rediraction, page re-loading). I want to do this to make my UCP just cleaner looking when going through certain pages/files. What am I trying to achieve? Heres an example on a profile, the URL would be: mysite.com/ucp/profile.php?player

URL Rewrite - remove directory name in the URL - PHP

て烟熏妆下的殇ゞ 提交于 2019-12-13 16:57:28
问题 I want to rewrite the url like this: http://localhost/public/viewbusiness.php?s=cyberbooger-web-services into http://localhost/viewbusiness.php?s=cyberbooger-web-services thus removing the directory name in the url. You noticed that the viewBusiness.php is located in the public directory. My application is not following the MVC architecture, and not using a framework. This is a application I am doing right as I currently studying PHP. My folder structure is like this: -- /app -- /public --

Point iisnode at server.js file nested in folder in an iis website

前提是你 提交于 2019-12-13 16:49:00
问题 I having trouble getting iisnode to run my node application. My directory structure is iis-site -client -server -server.js How can I get iisnode to point to a nested .js file? I tried this, but it servers the server.js instead of executing it. <handlers> <add name="iisnode" path="server\server.js" verb="*" modules="iisnode" /> </handlers> and <rule name="default"> <match url="/*" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false" /> <action type="Rewrite" url="server/server.js

RewriteCond and rewriteRule to redirect depending on the domain

寵の児 提交于 2019-12-13 16:38:21
问题 First of all, I've got a few domains pointing to the same webpage, each domain corresponfing to a different language. The webpage (Drupal) identifies the language using a /lang parameter in the url ( example.com/en ). I need to redirect every domain to its corresponding language so I need something like: example.com -> example.com/en example.ru -> example.ru/ru example.fr -> example.fr/fr I defined some rules in htaccess but they don't do what i expected: # Rewrite --- http://www.example.com

WordPress Custom Rewrite Rule towards Custom Page

我只是一个虾纸丫 提交于 2019-12-13 16:19:29
问题 Hi I have a wordpress based website that contains movies and tv-shows. Meta datas include the year of release, e.g. Inception has 2010 as year_of_release, the key of the meta data value. I need to do something to make a custom link so that it would be like website.com/year/2010 and it would show a custom page like year.php or whatever and take 2010 as a GET parameter so that I can show every movie released in 2010, or 2011 or whatever the parameter is. Basically it would be like website.com

Remove hash in URL (fullpage.js)

浪尽此生 提交于 2019-12-13 15:54:46
问题 I'm using the plugin fullpage.js Instead of hash urls for the sections like example.com/#sectionname) , I would like clean URLs like example.com/sectionname . The plugin doesn't provide this option but I'm curious if there is a simple enough way to achieve this regardless. Update 1: I've tried this callback: onLeave: function(index, nextIndex, direction) { if (nextIndex == 2) { history.replaceState(null, null, "/about") } } as well as this: afterLoad: function(anchorLink, index) { if (index =

How to convert plus (+) sign to “=+” with htaccess?

北战南征 提交于 2019-12-13 15:51:49
问题 I want to convert every url which contains "+" to "=+" for example that url: http://www.bedavaemlaksitesi.com/mersinemlakrehberi210/index3.php?+ should be like this: http://www.bedavaemlaksitesi.com/mersinemlakrehberi210/index3.php?=+ tried that and few other lines but doesn't work so far, i'm guessing it causes a loop or something. RewriteRule ^([^/\.]+)+([^/\.]+)?$ $1=+$2 [R] 回答1: I'm just gonna give you a literal answer for that specific example. Not sure if that will actually help you:

Htaccess Public Folder Rewrite Rule

为君一笑 提交于 2019-12-13 15:37:16
问题 I'm working on a little custom MVC project in PHP and am having some issues with the htaccess. Originally, my htaccess was routing all traffic to index.php in my root dir, and passing the remaining path as an argument. This was working perfectly with this code: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ index.php?path=$1 [NC,L,QSA] The problem I'm having now is that I need to move the index.php file into a /public directory. I