url-rewriting

IIS Url Rewrite results in 403 Forbidden

﹥>﹥吖頭↗ 提交于 2019-12-11 18:32:27
问题 UPDATE After enabling direcorty listing it seems to have worked but now im running into another error. Resource interpreted as Stylesheet but transferred with MIME type text/html I'm trying to rewrite a URL to take content from the absolute directory. Let's assume my URL was https://somesite.com/a <-- absolute path This directory consist of files like index.html, contact.html and folders like css,js,img But i want to access this directory with a URL like https://somesite.com/a/somename/index

.htaccess mode rewrite engine seems not working in my local marchine

两盒软妹~` 提交于 2019-12-11 18:31:49
问题 I have urls like this http://localhost/mysite/index.php?page=something which I only want to be http://localhost/mysite/something and on the homepage it should be http://localhost/mysite/ not http://localhost/mysite/index.php by using .htaccess Below is my code in .htaccess file: <IfModule mod_rewrite.c> RewriteEngine On rewriterule ^([^-]+)$ index.php?page=$1[L] </IfModule> But it shows the same to what has been before. I don't know if I wrote something wrong to the code above or maybe my

Mod Rewrite rule to redirect all pdf request to another location

血红的双手。 提交于 2019-12-11 18:22:18
问题 I'm trying to clean up our website. I'm using ISAPI Rewrite. I have figured out the regex I need to select the files in question. ^(?!.*?web_content.*?).*?\.pdf I want to redirect all pdf requests to look in web_content/pdf/ . So The pseudo rule I want is redirect all requests to pdfs that aren't already being requested from web_content/pdf. Drop off the original folder path. /somefolder/this/mycool.pdf ==> /web_content/pdf/mycool.pdf My question is how would I actually create the Mod rewrite

Using mod_rewrite to Convert Dynamic URLs to SEO Friendly URLs ??

浪子不回头ぞ 提交于 2019-12-11 18:19:45
问题 I am not a PHP developer and I have been asked to perform some SEO . Here Is My .htaccess RewriteEngine On RewriteBase / RewriteRule [_\ ] space.cgi [L] ErrorDocument 404 /errors/404.php ErrorDocument 400 /errors/badrequest.php ErrorDocument 401 /errors/authreqd.php ErrorDocument 403 /errors/forbid.php ErrorDocument 500 /errors/serverr.php ErrorDocument 503 /errors/ServiceUnavailable.php RewriteEngine On RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR] RewriteCond %{HTTP_USER_AGENT} ^Bot\

can not sitemap after url rewrite

筅森魡賤 提交于 2019-12-11 18:19:29
问题 I have written a rewrite rule in the .htaccess file for my website page: RewriteRule ^nice_url/$ ?p_action=user_profile&post_author=45 [L] The full link is: "http://www.example.co.il/nice_url/" it works perfect. BUT, when I try to create a sitemap (e.g. with http://www.web-site-map.com/), I have an indication that the link "http://www.example.co.il/nice_url/" is broken. Why? The link is working fine. Why is it indicated as broken? Thanks! 回答1: You can just add another rule to externally

Regex and Yahoo Pipes: How to replace end of url

时光总嘲笑我的痴心妄想 提交于 2019-12-11 18:16:57
问题 Here's the Pipe though you may not need it to answer the question: http://pipes.yahoo.com/pipes/pipe.info?_id=85a288a1517e615b765df9603fd604bd I am trying to modify all url's as so: http://mediadownloads.mlb.com/mlbam/2009/08/12/mlbf_6073553_th_3.jpg with http://mediadownloads.mlb.com/mlbam/2009/08/12/mlbtv_6073553_1m.mp4 The syntax should be something like: In item.mediaUrl replace f with tv and In item.mediaUrl replace last 8 characters with 1m.mp4 mlbf_(\d+)_.* replaced w/ mlbtv_$1_1m.mp4

How do I use web.config to redirect to a query string on Windows Server 2008 R2?

点点圈 提交于 2019-12-11 18:15:36
问题 I've got a redirect I want to do using web.config on an IIS 7.5 server running Windows Server 2008 R2. I'd like to simply make a shortcut URL for another URL with a very long query string: www.example.com/redirect -> www.example.com/long_url.aspx?key1=value1&key2=value2 When I add the following rewrite rule to web.config though, it gives a 500 Internal Server Error: <configuration> <system.webServer> <rewrite> <rules> <rule name="^redirect$" stopProcessing="true"> <match url="^redirect$" />

Wordpress rewrite post gallery image url

只愿长相守 提交于 2019-12-11 18:04:41
问题 By default, I have an attachment page URL: http://example.lt/photo/juokingi-pokalbiai-22-nuotraukos/attachment/221/ I want have: http://example.lt/photo/juokingi-pokalbiai-22-nuotraukos/gallery/221/ or: http://example.lt/photo/juokingi-pokalbiai-22-nuotraukos/221/ or: http://example.lt/photo/juokingi-pokalbiai-22-nuotraukos/img_name Is it possible to rewrite the attached images URL? In permalinks settings, I cant set additional URL only for tags and category, how about attachments? 回答1: Add

How to redirect a subfolder to a different domain?

可紊 提交于 2019-12-11 17:52:55
问题 I need to redirect a subfolder to another domain with the same subfolder name. For example, I want to redirect the following url www.domain.com/photo ...to another domain but same subfolder www.domain2.net/photo ...using mod_rewrite in .htaccess . 回答1: Try these lines in your .htaccess file: Options +FollowSymlinks -MultiViews RewriteEngine on # for HTTP RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^(?:www\.)?domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain2.net/$1 [R=301,L] # for

Change current URL on click with jQuery

女生的网名这么多〃 提交于 2019-12-11 17:51:08
问题 I want to change the current URL when I click on a link. At the moment, I'm using the following code to display a set of collapse items (with Bootstrap). If I click on one of the items, the URL should change with the content of the data-target attribute. Like this: domain.com/page/?data-target=collapseOne <div class="accordion" id="accordionExample"> <div class="card"> <div class="card-header" id="headingOne"> <h5 class="mb-0"> <button class="btn btn-link" type="button" data-toggle="collapse"