.htaccess
-
It might be helpful for debugging to add an R to your flags on your rules, such as:
RewriteRule ^index.php/archives/category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp/wp-feed.php?category_name=$1&feed=$2 [QSA,
R]
Then when you access the clean URL via a browser, the server will return a 302 error to redirect you to the crufty page URL, thus you can use the address bar to see where mod_rewrite wants to redirect you and troubleshoot it a little better.
(So when you puthttps://stonegauge.com/index.php/archives/2004/10/16/ive-failed-you-rebecca-mckinney/
into the address box, it should change to something likehttps://stonegauge.com/index.php?year=2004&monthnum=10&day=16...
and you’ll see what it’s trying to do.)I try to add the R’s and it corrupts my .htaccess file and makes the entire WP directory inaccessible (internal server errors). No access to WP Admin control panel, style sheets stop working on site, etc.
i noticed that your site directory looks like this:
https://www.site.com/wp
and then the permalink points to
https://www.site.com/archives/10/11/04/this_is_the_story_title
shouldn’t there be a /wp/ before “archives” in the URI?Amit – while you did discover that having WP in a seperate directory was part of the problem…
I just used the code you had presented above and that corrupts the .htaccess file for me, locking out that WP directory and the contents of it (css files, admin control panel, etc) with an internal server error.
I would be willing to actually try moving the contents of Wordppress on my server to the root directory and trying this again if you guys think it will make a difference?OK, what IS working now is this:
In the Admin control panel (after I erased my .htaccess file manually and uploaded a clean template) I went to OPTIONS and changed where my URI Address in the general options page to https://www.stonegauge.com/wp/
Then updated rewrite base to /wp/
All of the other parts to the Permalink structure were standard…. I saved the template and went to my site…
Lo and behold – it worked. Well, at least from the copy of the index file in the /wp/ directory.
So should I just move the contents of the WP directory (all files. folders) into the root? Will it cause any problesm with the install besides havign to change general options again?
Thanks Amit, ringmaster, brad, Doraemon and everyone else…AnonymousAnother question here:
My permlinks are working too, but only problem is some images disappeared. Should I change all images links to absolutle path?
Anyone please, thanks!I would.
There is a way around that somewhere here – do a search for ‘base_url’I got this to work without moving the install. The key is to have the .htaccess file in the same directory as the index.php file, regardless of where wp is installed.
host: dreamhost
site: https://herebox.org
my .htaccess file, chmod’d to 666:
RewriteEngine On
RewriteBase /
RewriteRule ^blog/topic/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp/wp-feed.php?category_name=$1&feed=$2 [QSA]
RewriteRule ^blog/topic/?(.*) /index.php?category_name=$1 [QSA]
RewriteRule ^blog/archives/author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp/wp-feed.php?author_name=$1&feed=$2 [QSA]
RewriteRule ^blog/archives/author/?(.*) /index.php?author_name=$1 [QSA]
RewriteRule ^blog/archives/?([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([_0-9a-z-]+)?/?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
RewriteRule ^blog/archives/?([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/(feed|rdf|rss|rss2|atom)/?$ /wp/wp-feed.php?year=$1&monthnum=$2&day=$3&name=$4&feed=$5 [QSA]
RewriteRule ^blog/archives/?([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([_0-9a-z-]+)/trackback/?$ /wp/wp-trackback.php?year=$1&monthnum=$2&day=$3&name=$4 [QSA]
RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /wp/wp-feed.php?feed=$1 [QSA]
RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /wp/wp-feed.php?feed=$1&withcomments=1 [QSA]AnonymousHi there.. i?′ve been having this same problem with htaccess and when suddenly it started to work (i mean the redirection to this structure: /archivos/%category%/%postname%/ ) suddenly i can not log into the WP Admin.
The only message i get is :
Sorry, no posts matched your criteria.
In every URL like this one:
https://testing.uberbin.net/wordpress/wp-admin/index.php nor this one:
https://testing.uberbin.net/wordpress/wp-admin/edit.php nor any other page within the domain :S
The .htaccess i chmoded as 666 have this data (ONLY this data):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /wordpress/index.php?feed=_$1 [QSA,L]
RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /wordpress/index.php?feed=_$1&withcomments=1 [QSA,L]
RewriteRule ^page/?([0-9]{1,})/?$ /wordpress/index.php?paged=$1 [QSA,L]
RewriteRule ^site/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^site/([^/]+)/page/?([0-9]{1,})/?$ /wordpress/index.php?pagename=$1&paged=$2 [QSA,L]
RewriteRule ^site/([^/]+)/?$ /wordpress/index.php?pagename=$1 [QSA,L]
RewriteRule ^search/(.+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?s=$1&feed=$2 [QSA,L]
RewriteRule ^search/(.+)/page/?([0-9]{1,})/?$ /wordpress/index.php?s=$1&paged=$2 [QSA,L]
RewriteRule ^search/(.+)/?$ /wordpress/index.php?s=$1 [QSA,L]
RewriteRule ^category/(.+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?category_name=$1&feed=$2 [QSA,L]
RewriteRule ^category/(.+)/page/?([0-9]{1,})/?$ /wordpress/index.php?category_name=$1&paged=$2 [QSA,L]
RewriteRule ^category/(.+)/?$ /wordpress/index.php?category_name=$1 [QSA,L]
RewriteRule ^author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?author_name=$1&feed=$2 [QSA,L]
RewriteRule ^author/([^/]+)/page/?([0-9]{1,})/?$ /wordpress/index.php?author_name=$1&paged=$2 [QSA,L]
RewriteRule ^author/([^/]+)/?$ /wordpress/index.php?author_name=$1 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /wordpress/index.php?year=$1&monthnum=$2&day=$3&paged=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /wordpress/index.php?year=$1&monthnum=$2&day=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /wordpress/index.php?year=$1&monthnum=$2&paged=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/?$ /wordpress/index.php?year=$1&monthnum=$2 [QSA,L]
RewriteRule ^([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?year=$1&feed=$2 [QSA,L]
RewriteRule ^([0-9]{4})/page/?([0-9]{1,})/?$ /wordpress/index.php?year=$1&paged=$2 [QSA,L]
RewriteRule ^([0-9]{4})/?$ /wordpress/index.php?year=$1 [QSA,L]
RewriteRule ^(.+)/([^/]+)/trackback/?$ /wordpress/index.php?category_name=$1&name=$2&tb=1 [QSA,L]
RewriteRule ^(.+)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?category_name=$1&name=$2&feed=$3 [QSA,L]
RewriteRule ^(.+)/([^/]+)/page/?([0-9]{1,})/?$ /wordpress/index.php?category_name=$1&name=$2&paged=$3 [QSA,L]
RewriteRule ^(.+)/([^/]+)/?([0-9]+)?/?$ /wordpress/index.php?category_name=$1&name=$2&page=$3 [QSA,L]
RewriteRule ^(.+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?category_name=$1&feed=$2 [QSA,L]
RewriteRule ^(.+)/page/?([0-9]{1,})/?$ /wordpress/index.php?category_name=$1&paged=$2 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/?$ /wordpress/index.php?category_name=$1 [QSA,L]
</IfModule>Anon – have you definitely cleared your browser cache and cookies ?
sorry.. ive posted without login.. the one with the wp-admin is me ??
podz.. yes.. i?′ve done that.. I even tried with my laptop ??
And i?′m still getting that :
<b>Sorry, no posts matched your criteria.</b>“Resoluci?3n 210 o Como matar el desarrollo de WiFi
Noviembre 23, 2004, 11:04 AM | Categor?-a: Estrategias”
I see that at the site linked from your name, so if that’s the site, it’s a browser issue your end ?podz… sorry i?′ve changed my URL to avoid the problem.
The WP-URL is:
https://testing.uberbin.net/wordpress/
The WP-Admin url is: https://testing.uberbin.net/wordpress/wp-admin/index.php
I really dont get where the mistake is.
my .htaccess has only the lines that WP told me to :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /wordpress/index.php?feed=_$1 [QSA,L]
RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /wordpress/index.php?feed=_$1&withcomments=1 [QSA,L]
RewriteRule ^page/?([0-9]{1,})/?$ /wordpress/index.php?paged=$1 [QSA,L]
RewriteRule ^site/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^site/([^/]+)/page/?([0-9]{1,})/?$ /wordpress/index.php?pagename=$1&paged=$2 [QSA,L]
RewriteRule ^site/([^/]+)/?$ /wordpress/index.php?pagename=$1 [QSA,L]
RewriteRule ^search/(.+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?s=$1&feed=$2 [QSA,L]
RewriteRule ^search/(.+)/page/?([0-9]{1,})/?$ /wordpress/index.php?s=$1&paged=$2 [QSA,L]
RewriteRule ^search/(.+)/?$ /wordpress/index.php?s=$1 [QSA,L]
RewriteRule ^category/(.+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?category_name=$1&feed=$2 [QSA,L]
RewriteRule ^category/(.+)/page/?([0-9]{1,})/?$ /wordpress/index.php?category_name=$1&paged=$2 [QSA,L]
RewriteRule ^category/(.+)/?$ /wordpress/index.php?category_name=$1 [QSA,L]
RewriteRule ^author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?author_name=$1&feed=$2 [QSA,L]
RewriteRule ^author/([^/]+)/page/?([0-9]{1,})/?$ /wordpress/index.php?author_name=$1&paged=$2 [QSA,L]
RewriteRule ^author/([^/]+)/?$ /wordpress/index.php?author_name=$1 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /wordpress/index.php?year=$1&monthnum=$2&day=$3&paged=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /wordpress/index.php?year=$1&monthnum=$2&day=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /wordpress/index.php?year=$1&monthnum=$2&paged=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/?$ /wordpress/index.php?year=$1&monthnum=$2 [QSA,L]
RewriteRule ^([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?year=$1&feed=$2 [QSA,L]
RewriteRule ^([0-9]{4})/page/?([0-9]{1,})/?$ /wordpress/index.php?year=$1&paged=$2 [QSA,L]
RewriteRule ^([0-9]{4})/?$ /wordpress/index.php?year=$1 [QSA,L]
RewriteRule ^(.+)/([^/]+)/trackback/?$ /wordpress/index.php?category_name=$1&name=$2&tb=1 [QSA,L]
RewriteRule ^(.+)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?category_name=$1&name=$2&feed=$3 [QSA,L]
RewriteRule ^(.+)/([^/]+)/page/?([0-9]{1,})/?$ /wordpress/index.php?category_name=$1&name=$2&paged=$3 [QSA,L]
RewriteRule ^(.+)/([^/]+)/?([0-9]+)?/?$ /wordpress/index.php?category_name=$1&name=$2&page=$3 [QSA,L]
RewriteRule ^(.+)/(feed|rdf|rss|rss2|atom)/?$ /wordpress/index.php?category_name=$1&feed=$2 [QSA,L]
RewriteRule ^(.+)/page/?([0-9]{1,})/?$ /wordpress/index.php?category_name=$1&paged=$2 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/?$ /wordpress/index.php?category_name=$1 [QSA,L]
</IfModule>” Veo unos n?omeros de Skype que son realmente incre?-bles y, a primera vista, parecen asegurar el crecimiento futuro de este producto:”
is the second post on that page. Oddly, the default wp first post is the first there… but I do see the page.
- The topic ‘.htaccess’ is closed to new replies.