Tagged Questions
0
votes
1answer
30 views
Prevent Wordpress from automatically correcting URLs
I notice that if I type in http://www.example.com/pag I can land on an existing page that has a name like http://www.example.com/page_five. I don't know exactly what causes this, but I want to know if ...
0
votes
0answers
35 views
Adding in Custom Directory/Path in URL Without Effecting Permalinks
After several tries of piecing together different forms of add_rewrite_rule() and .htaccess edits, I have not been able to find a solution that works. I want to add in a custom directory to a ...
0
votes
1answer
34 views
What is the proper way to use add_rewrite_rule to remove the (question mark)?
I have a page called "People" with a custom template that takes in a variable called name:
example.com/people/?name=FirstLast
What I want is this:
example.com/people/FristLast
I know I need to use ...
1
vote
0answers
38 views
How to rewrite a URL to another rewritten URL without changing the address?
Just got to the end of a site build and the client is now saying the original site URL's need to stay the same and do not want to do 301 redirects due to loss of link juice.
The structure of the site ...
0
votes
1answer
35 views
Rewrite vs Redirect from ?p={ID}
WordPress does a 301 from http://example.com/?p=100 to http://example.com/post-title/, but I thought a URL rewrite was different from a redirect and therefore this wouldn't result in a 301.
Can ...
0
votes
1answer
77 views
ow to change cutsom page url of wordpress site using htaccess
i need help in httaccess rewrite of a wordpress site. i have url like below
http://thewhiterabbit.dk/beta/steder-detail/?id=floos
i want it to be like
...
1
vote
1answer
217 views
Passing parameters to a custom page template using clean urls
I am now passing parameters to a custom template in the following format
www.example.com/?pageid=12&rid=24&title=this-is-the-title
I have created two tables . So I need to fetch data and ...
0
votes
2answers
58 views
subdirectory install breaking existing links
I've had this issue several times now. While building a site, including some content, I keep wordpress in a subdirectory (say, /wordpress/). When putting it live, I move/copy 3 files out of the dir ...
0
votes
2answers
46 views
Is Wordpress API visible from PHP file called in htaccess
I'm trying to add some rewriterules in the .htaccess file to deal with hotlinked images - specifically I want to add the URL from the post where the image appeared to the header location information ...
3
votes
1answer
158 views
Add rewrite rule in plugin: with .htaccess in plugin folder or using WordPress functions
I need add a rewrite rule in my plugin, and distribute it with my code. All works fine if I put the rule in the .htaccess in the WordPress root folder, but I need distribute the plugin with my rule.
...
2
votes
1answer
116 views
Members area with externally-managed htaccess / htpasswd authentication?
I am looking at the feasibility of converting a client's site from countless hand-built web pages to a WordPress installation. The challenge is that we have a free area and a members-only area. The ...
1
vote
2answers
71 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
101 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 ...
0
votes
0answers
109 views
.htaccess redirect from www to non-www does not work [closed]
I haved inserted a -usually perfectly fine operating- htaccess condition and rewrite into my standard wordpress .htaccess file in order to redirect to a non-www url when www is prepended. It does not ...
0
votes
1answer
129 views
Custom url structure - pages under a custom post type
I'm struggling with the structure of my Wordpress site and I was hoping you might be able to give me some advice.
The site is for a series of events and the structure is as follows:
Gateway ...
2
votes
0answers
132 views
get_permalink returns default link
I hope you can help me.
So i'm using /%postname%/ as permalink structure, and my htaccess is this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /develop/sekai/
...
1
vote
0answers
37 views
Customise particular RSS permalink
From my old static website, I want to preserve some URLs like the RSS Feed one.
My feed URL is http://traduction.bainslesbains.com/actualite-russe.xml and I want to redirect it to the category feed ...
0
votes
1answer
198 views
.htaccess rewrite
I have created a custom post type called 'event' and added an event called London 2012. I want the following URL structure for a page:
local.mysite.com/london-2012/speakers
I have created a page ...
0
votes
1answer
66 views
unexpected problem in url rewrite
As per the answer provided in How to create custom URL routes? I have created the rewrite rule using the same function provided.
add_action( 'init', 'wpse26388_rewrites_init' );
function ...
1
vote
1answer
83 views
How to redirect to correct pages after permalink structure change
I am changing my permalink structure from /%year%/%monthnum%/%postname%/ to /%category%/%postname%/.
Is it possible to redirect old links using old permalink structure to the new link? Possibly via ...
0
votes
1answer
192 views
Problems with permalinks (.htaccess not working)
I would like to use permalinks but they are not working. Whenever I use permanlinks like /%postname*/ are something else that differs from the default ... I get an 404-error.
Calling php_info I can ...
0
votes
2answers
632 views
How to disable the default WordPress redirect to non-www URLs?
I am trying to redirect all non-www to www URLs in my WordPress MultiSite install. I am using a simple .htaccess rule like this:
# Redirect non-www to www:
RewriteCond %{HTTP_HOST} !^www\. [NC]
...
0
votes
1answer
129 views
custom naming of search permalink /search/
I found this snippet online …
function search_url_rewrite_rule() {
if ( is_search() && !empty($_GET['s'])) {
wp_redirect(home_url("/search/") . urlencode(get_query_var('s')));
...
0
votes
2answers
958 views
Two “.htaccess” Files Located in Different Directories?
I found two ".htaccess" files, one is located in '/httpdocs/.htaccess', another one is located in '/httpdocs/wordpress/.htaccess', the content is different, is it normal?
The Wordpress was installed ...
-1
votes
2answers
105 views
Please Check this '.htaccess' File
I just found my '.htaccess' file has the same lines of code repeated twice as below, maybe some plugins changed it, is it incorrect? Should I remove the repeated one? Thanks!!
<IfModule ...
0
votes
0answers
93 views
htaccess get content from other folder [closed]
I'm using nextgen gallery plugin in my blog. The default folder for storing images is wp-content/gallery/gallery_name/ . I'm looking for a way to move all images in all galleries to one folder.
...
1
vote
0answers
159 views
htaccess rewrite, adding segment to url
Im not that good with htaccess files & regexes, and i'm trying to add a segment to a certain url. I'm building a website for a festival and we have a comon structure for the artists being:
line-up ...
1
vote
0answers
94 views
Having a sub directory with a separate site
Hi I am new to wordpress and I have successful installed my blog wp site. The location of this is on my go daddy hosting server under "\". So WP has installed everything there and I see different ...
3
votes
1answer
130 views
Removing rules from .htaccess
I'm writing a small plugin that needs to write to .htaccess a simple non_wp_rule and i am doing it like this:
function ci_flush_rules()
{
global $wp_rewrite;
$wp_rewrite->flush_rules();
}
...
0
votes
1answer
68 views
Wordpress redirection to get url friendly
I want to get url friendly for pass data to page from other page.
I explain :
I have on i classic wordpress page, url like it : ( example.com/agent/name_agent )
it's url build dynamically. ( ...
1
vote
2answers
203 views
How to map permalinks with accented letters to sanitized slugs?
To keep legacy entries on a blog hosted on TypePad on sync with a new WordPress installation...
How do I map this permalink with accented letters:
domain.com/no-es-fácil-alejarse-de-la-política
to ...
0
votes
1answer
121 views
Wordpress add_rewrite_rules for custom URLs ending in .html
It's pretty common to see Wordpress running on pretty permalinks in the style of:
/blog/2012/04/my-post/
However I'm trying to customize a fresh Wordpress install with a different set of URLs. I ...
0
votes
1answer
366 views
Setting up .htaccess for subdirectory [closed]
I've edited the .htaccess on root as referenced in Codex:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?mydomain.com$
RewriteRule ^(/)?$ blog [L]
The /blog/ directory has a .htaccess file:
# ...
0
votes
1answer
184 views
Auto 301 to full post permalink? (using /posts/%post_id%/%postname%)
I update my permalink structure to /post/%post_id%/%postname%, but if someone uses a URL like /post/1234 instead of the full URL of /post/1234/bingo-rulz, WordPress shows the post without giving a 301 ...
1
vote
1answer
176 views
How can I dynamically generate an image with a static image URL?
What I'm trying to do is very simple.
Whenever someone visits, say site.com/socialproof.png, I want it to use a rewrite rule to point it to a file in my plugins folder.
Can I do this with WP's ...
0
votes
1answer
351 views
Changes done to .htaccess are not getting reverted back
I am new to WordPress and playing around with it to get some idea about its working. I have done some changes to WordPress' .htaccess file to add some redirection and that worked perfectly fine.
Now ...
0
votes
1answer
2k views
custom htaccess rewrite rule for page
i have a page in wordpress called "video". its page id is 6, and its slug is "video"
in my theme ive set it up to show content based on GET variables
here is the URL rewrite im trying to set up:
...
5
votes
3answers
2k 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
1answer
383 views
How to manually add permalink base into htaccess file [closed]
And when I use the permalink editor to add a base, it messes up my author links.
My current url structure is www.example.com/123 (123 being post_id)
And my author URL is www.example.com/author-name ...
0
votes
1answer
1k views
Rewrite rule that wp-login.php?action=register is left alone
Unfortunately buddypress breaks a facebook connect script because of the rewrite rules. It changes /wp-login.php?action=register into /register/
I tried to find where the custom rewrite rule is ...
0
votes
1answer
164 views
Problem with permalinks [closed]
very weird things happening to my permalinks. its showing me 404 error when i switch to permalinks then when i change to default and then back to permalinks its fine until i actually edit url to ...
0
votes
1answer
531 views
Help with a custom rewrite
The following is a snippet from single.php
</div>
<?php endif; ?>
<?php
...
0
votes
1answer
202 views
WordPress total posts per page changed and now 404 Http error comes out [closed]
I have migrate my web site from Joomla to WordPress. All are fine, I have create my Rewrites in htaccess to stop 404 from old URLs but I have problem with pagination.
In Joomla web site, I had 6 ...
0
votes
1answer
446 views
How to add multiple rewrite rules to WordPress .htaccess and delete them separately?
After an intense research without finding the proper answer I decided to ask my question here.
I need to add some rewrite rules when activating a plugin in WordPress without existing custom rules ...
0
votes
1answer
505 views
Can't get pretty permalinks to work without index.php
I've worked with WordPress for a while now and this is the first time I've had this problem, I can't get my permalinks to work without index.php on the URL even though mod_rewrite is enabled, a few ...
2
votes
2answers
5k views
How to change “wp-admin” to something else without search-replacing the core?
for example: foobar.com/wp/edit instead of foobar.com/wp/wp-admin
How would I do that?
I've tried using this in htaccess but it won't work:
##### ABOVE THIS POINT IS ALREADY INSERTED BY WORD PRESS
...
1
vote
1answer
59 views
How to redirect http://mydomain/blog/blahblah/ to http://mydomain/blahblah/ in wordpress htaccess?
I would like the htaccess rewrite rule to compare to IIS rewrite rule I tried which doesn't seem to work:
<rule name="rewrite /blog/">
<match url="^blog/([_0-9a-zA-Z\-]+)/$" />
...
2
votes
1answer
494 views
Issue with using .htaccess to redirect feedburner feed
I am using year/month/post-name permalinks, and also using the download-monitor plugin to handle file downloads. I added rewrite rules to the top of the .htaccess file following the instructions at ...
5
votes
1answer
224 views
Clash of the rewrites
I have a category called 'neighborhoods'. I also have child categories within 'neighborhoods' E.G. Lakewood, Highland Park...
When I click 'highland park' the url is ...
0
votes
3answers
277 views
How to redirect a virtual page (e.g. /blog) to the home page?
I want my to reach my website's main page when entering an url like:
http://example.com/blog
However, I can't seem to get it to work with a typical rewrite rule:
RewriteRule ^/blog$ /
I'm always ...
