The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch.

learn more… | top users | synonyms

0
votes
2answers
246 views

Simple seo-friendly custom $_GET url rewrite with htaccess

I have this url: http://sitename.com/?game=runescape Is it possible to modify the htaccess file or rewrite the url via Wordpress to become like this: http://sitename.com/game/runescape
1
vote
1answer
507 views

mod_rewrite loop, redirecting http to https on certain section of wordpress blog

I'm trying to rewrite 3 sections of a wordpress site to https if they are accessed over http: /cart/ /my-account/ /checkout/ As well as these rewrite's worpress has added a rewrite to remove ...
0
votes
1answer
57 views

Rewriting a date hierarchy into a 'yyyy-mm-dd' slug

I am building a magazine website with an issue custom post type. The slugs for each issue follow the format YYYY-MM-DD according to the issue's publish date. Currently the permalinks are set up as ...
0
votes
2answers
297 views

How to Create a Mod_Rewrite/Regex Rule to Redirect Requests old URLs to Their Updated Link Structure

Here goes... How would I create a mod_rewrite rule to that will redirect a variety of possible URL requests to their updated URL counter parts. We are migrating and old site to a CMS with a ...
0
votes
2answers
56 views

Wordpress .htaccess rewrite for custom template

I am trying to convert a website to WordPress. The URLs in use are currently in the format: http://www.example.com/database/44/category/short-item-description.html To display items ...
2
votes
1answer
353 views

Should I enable FastCGI on WordPress?

I am looking at my server settings and these are as follows: WebDav : active FastCGI : inactive SSL support : active Perl as Apache module : CGI-Programm PHP module : ...
1
vote
1answer
68 views

Only default permalink is working mod_rewrite enabled

My problem is in my wordpress site only default permalinks is working.. When I change permalinks all pages become not found.. only home page is showing. When I change permalinks to postname .htaccess ...
1
vote
2answers
85 views

Why does Wordpress redirect when I separate wp-core and wp-content?

I'm trying to setup my Wordpress projects so that I can have http://www.example.com/ as my site URL, say mapped to /var/www/vhosts/www.example.com/ and in there, I would like to use the following ...
0
votes
0answers
86 views

Page 404 not working after install w3 total cache

After I installed the W3 Total Cache plugin (http://wordpress.org/plugins/w3-total-cache/), anytime I get a 404 error I am redirected to my home page. I believe the issue is originating from my ...
1
vote
2answers
152 views

Removing subcategories from permalinks

I run a small news site with tens of thousands of entries. I'm currently importing all of these into wordpress by rebuilding our old CMS into wordpress. So far, everything is coming over smoothly. ...
0
votes
1answer
62 views

how to exclude admin page from add_rewrite_rule in wordpress

I'm trying to add the following rewrite rules: add_rewrite_rule('([A-Za-z0-9])/([A-Za-z0-9])', 'index.php/product?subcategory=$1&product=$2', 'top'); add_rewrite_rule('([A-Za-z0-9])', ...
0
votes
1answer
152 views

WP is ignoring .htaccess rewritten URL

I have two domains being served from the same WP install. edit: not multi-site In wp-config.php I have define('WP_SITEURL', "http://$hostname/wordpress"); etc. The two domains will have similar ...
0
votes
0answers
95 views

WP Multisite URL rewrite static content folder

I have a WP multisite installation on the root folder. one of the sites have a subdomain subdomain.mysite.com in the root folder there is a sub directory called /subdomain-static folder ...
0
votes
0answers
29 views

Remove the first occurrence of a sub-site slug from URL

I have a multisite install with about 30 sub-sites. I want to know if it's possible to remove the sub-site slug if there are more than two occurrences of it in the URL. For instance: ...
0
votes
0answers
137 views

Only homepage working correctly, 404 error on everything else

I've been developing wordpress based websites for some time now, and i built one for my company's own brand, it worked with no problem at all for ages, but now for some reason, i can only get the ...
0
votes
0answers
65 views

Wordpress query string rewrite .htaccess

At the minute my .htaccess looks like: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /testdirectory/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f ...
0
votes
0answers
68 views

url rewrite subdomain to multisite

I have a multisite install of WordPress on an Apache (windows server 2008) with one "child" site. So: C:\Apache24\htdocs\wordpress is the physical install location ipaddress/wordpress/childsite is ...
0
votes
1answer
40 views

Wordpress rewrite question

I am new here and have a question about URLs in WordPress. The very front-facing portion of my website uses WordPress just so I can use the CMSs and blog for my SEO. I have a real estate portion of ...
0
votes
1answer
741 views

Facebook sharer and parameters in URL

So after a lot of troubles (and thanks to this answer) I managed to make a GET parameter look better in URL, from www.url.com/mypage/?id=123 to www.url.com/mypage/123/ I hoped that would solve the ...
8
votes
3answers
5k views

Masking wp-content/themes/name/images to just images directory using htaccess

I'm trying what I thought would be something really simple of masking my url but cannot seem to get it to work. I want to be able to link to images in my img tag without having to type in the full ...
0
votes
0answers
79 views

customize urls displayed by previous_post_link and next_post_link

I am using the below code to display my next and previous links in single.php: <div class="nav-previous"><?php previous_post_link( '%link', '<img height="34" src="' . ...
0
votes
0answers
42 views

.htaccess not working in Wordpress

I'm trying to make use of the post name permalink so that visitors can access the page created by the plugin that I'm using. I've already checked phpinfo() and mod_rewrite is listed under the loaded ...
0
votes
0answers
24 views

Custom Taxonomy custom structure

permalink structure is /blog/category/postname got a custom taxonomy which now prepends 'blog' to itself. /blog/custom_taxonomy/category/ want to get rid of 'blog'. using Magic Fields 2 (not by ...
0
votes
0answers
45 views

Custom site-wide url redirect

What would be the best way to go about this situation: I have a site that I want to allow other people to link to, but then keep their links maintained across the entire site. So say, if I was a ...
0
votes
0answers
53 views

Custom Rewrite for Profiles

I'm currently trying to modify my rewrites to allow for an additional URL segment e.g. http://example.com/vendors/username/ by default WP allows for additional numeric segments but everything else ...
2
votes
1answer
2k views

404 when fetching image from wp-content/uploads/

I get 404 status when fetching images, and the http still contains that image. Image shows up in a browser, but the 404 code breaks some applications. calls to wp-content/uploads/ are redirected in ...
0
votes
1answer
192 views

Localize URL bases

I run a non-English blog. I love that WordPress has been translated to Spanish and currently I use the Spanish translated version of WordPress. One thing that I'd really like to change is the URL ...
-1
votes
1answer
52 views

Permalinks is not working in my wordpress setup

I am newbie to wordpress. I have created a site using wordpress and WAMP stack. In my Apache i have enabled mode_rewrite , so my site is showing permalinks perfectly. Now i have hosting provider of ...
0
votes
2answers
28 views

Access posts while mod_rewrite is broken

On my wordpress installation mod_rewrite (e.g. the permalinks) is temporarily broken. For debugging I want to access the formerly "prettified" page mydomain.tld/page/2. What is the old GET parameter ...
3
votes
1answer
2k views

“.#[random-char-string]” being inserted at end of URLs

I've seen this on a couple of sites now and I'm having trouble finding information about (probably because it's awkward to describe): All internal URLs like this for example: ...
0
votes
1answer
186 views

Use the category name instead of category slug in permalinks

How to create a permalink structure which finish by: /category-name/post-name/ Instead of: /category-slug/post-name/ By default, Wordpress is offering %category% tag strucure as "A sanitized ...
0
votes
0answers
182 views

Add-on domain works in Wordpress but links still lead to subdomain

I know this looks like a common question, and I assure you I've tried a bunch of responses, but none seem to work in my case. I'm a Wordpress noob so I might be making some basic error which I can't ...
2
votes
1answer
141 views

Using custom post type parent as slug

I'm currently using the plugin 'Types Custom Post Type' to create custom post types (I know it's pretty easily done through functions.php but I was feeling a bit lazy!). Basically, I'm looking to ...
0
votes
1answer
250 views

Redirect URL Containing åäö

I'm moving my blog from Typepad to Wordpress but have a big problem. Among the urls that are exported from Typepad, many containing åäö. When they are imported WordPress changes all URLs and instead ...
0
votes
1answer
70 views

Function to rewrite URl in Wordpress

I need to rewrte this URL http://example.com/news/?news_id=2 to http://example.com/news/2 where news is the page and 2 is the news_id I have added following code in functions.php: function ...
2
votes
2answers
416 views

How to protect media directory with .htaccess?

I am trying to protect the uploads directory with .htacess. But when I browse media section in admin panel, I see user/pass popup. My guess is, WordPress use fopen to find if the file exists. I ...
1
vote
0answers
110 views

Changing URL scheme, mod_rewrite not helping

We're trying to move away from the /YYYY/MM/DD/Post-Title URL structure without breaking links that are floating around on the internet. The mod_rewrite rule is fairly straight forward - RewriteRule ...
3
votes
1answer
90 views

Change permalinks for posts but not for custom post types

Currently my permalink structure for posts is domain.com/post-title I'm using a static front page and a "blog" page for posts. I'd like to to change the permalink structure for posts, tags and ...
1
vote
1answer
413 views

Need help with simple rewrite rule (shouldn't this be easy?)

All I need is a rewrite that will change example.com/anyphrase into example.com. Here is what I am using: RewriteCond %{HTTP_HOST} ^example\.com RewriteCond %{SCRIPT_FILENAME} !wp-admin RewriteCond ...
0
votes
1answer
93 views

Custom domain for sub-section of parent website

While this topic could be considered a general web development item, I'm using WordPress, so I need to find some way to do this within WordPress and without breaking it. I realize this is a deep ...
2
votes
1answer
199 views

add new permalink structure from dynamic page

I created page "play" url: http://localhost/myweb/play and inside of page "play" I include PHP code to make the new search from outside Wordpress. And all worked, if I search from my page "play" the ...
0
votes
1answer
270 views

Why wp redirects me to wp-login.php when I visit a rewritten wp-admin URL?

I have this rewrite rule ^dashboard(.*) wp-admin$1 [L] and wp redirects me to wp-login.php when I try to visit /dashboard (even if I am logged in) Any idea why this happen, and how I can solve ...
1
vote
2answers
149 views

mod_rewriting conflict with WP permalinks in htaccess [closed]

I need some help! I'm trying to rewrite this... localhost/blog/?c=var to-> localhost/blog/var But seems there is some problem... I get a 500 :( I also believe there is some conflict with the ...
0
votes
2answers
392 views

permalink results to “page not found”

Whenever I change my permalink option from the default to /%postname%/, it results into my page cannot be found. Wordpress would complain that it cannot modify the .htaccess (because there was none), ...
1
vote
1answer
288 views

ReWriteRules and WordPress Multi-Sites with Sub Directories

I'm having a diffucult time getting the ReWriteRules and URL structures setup for a Wordpress 3.4.2 (latest version as of this post) blog with multi-site enabled. www.ourdomain.com/ is the homepage ...
0
votes
2answers
641 views

Rewrite Rules Are Redirecting and Not Passing VARs

I have the following code in my functions.php file. <?php add_action('init', 'flush_rewrite_rules'); function custom_add_rewrite_rules( $wp_rewrite ) { $new_rules = array( ...
3
votes
1answer
236 views

Sub domain redirection to taxonomy

Hi all I want to use sub domain for my taxonomy like that : http://taxonomy.domain.com/apple map to http://www.domain.com/taxonomy/apple I add this to my vhost RewriteCond %{HTTP_HOST} ...
0
votes
1answer
56 views

Types plugin breaking because of server configuration

I have tested this on three different hosts, using a number of different versions of both Types and WordPress, and I believe I've narrowed it down to my host (Firehost) setup, which they recently ...
1
vote
2answers
100 views

a one-off rewrite rule

I have one page that I need to change the URL for. Currently, the page resides at example.com/departments/human-resources/ (human-resources is a sub-page of /departments/ ) My client wants to ...
0
votes
2answers
214 views

How do I make WordPress revise an .htaccess file a certain way?

I've learned just a slight bit with WordPress Rewrite API -- just enough to add another rewrite rule for a plugin. The plugin works if installed in the root, but I'm finding that if one installs ...