grumpster
Forum Replies Created
-
Forum: Installing WordPress
In reply to: How can I turn off WordPress’ index.php redirect to domain root?mrmist,
Dude, you rock. That plugin script works like a charm.
Thank you for showing me that, and my thanks to Mark Jaquith for writing it.
??
Forum: Installing WordPress
In reply to: How can I turn off WordPress’ index.php redirect to domain root?KeyTechJosh,
Sorry, I just saw your post now.
If you borked your site by changing the WordPress address (URL) value, you can change it back by editing the value directly in the database.
In my case, I used PHPMyAdmin to make the edit.
In PHPMyAdmin, find the table named wp-options in the left-hand column that lists all the table names.
Once you’ve clicked on wp-options, click the Browse tab at the top of the main PHPMyAdmin info area to the right of the table name listing column.
This will bring up a list of fields in the wp-options table. The first row has an option_name of siteurl. Click the pencil icon on the left of that row.
You can now edit the WordPress address (URL) value directly. When you are done editing, click “Go” at the bottom of the editing area and your site will, we hope, come back online and you can log into the admin area.
Forum: Installing WordPress
In reply to: How can I turn off WordPress’ index.php redirect to domain root?Ha!
I still can’t get the domain.tld/index.php to show, but I can now see the individual posts because I changed a setting in the Permalinks section.
Admin Dashboard > Settings > Permalinks
I changed the URL formatting of the permalinks from Default to Numeric.
With the new setting, instead of the default URL which was https://domain.tld/?p=8, I now get https://domain.tld/archives/8, which gets around that whole home directory baloney.
Moving on …
But I’d still like to know if it’s possible to make WP stop taking that index.php off of the URL.Forum: Installing WordPress
In reply to: How can I turn off WordPress’ index.php redirect to domain root?design_dolphin,
Thanks for the suggestion, but that’s not what I’m trying to achieve. What your link suggests merely provides a redirect page that says “We’re Upgrading. Come back soon!”
Let me try to be more clear about my needs:
The site in question is rather large. It will take me several days to move all the content in the existing static .shtml pages into the new WordPress site. During that time, I want the existing static HTML site to remain online and available to visitors.
In the past, when I have upgraded static HTML websites to any of a number of different PHP-based CMS, I can install the CMS in the root directory of the existing static site, and so long as I provide a DirectoryIndex index.htm line in the htaccess file, visitors to the site will continue to see the old site.
While those visitors are happily viewing the old site, I can type in the direct URL to the new CMS in development https://www.domain.tld/index.php and that will give me the homepage of the as-yet unfinished PHP-based CMS site because those CMS don’t strip the /index.php off the URL.
But, WordPress seems to want to strip the /index.php off of the URL and send me automatically to the domain.tld/. It is probably doing that for SEO reasons (I’m guessing they want to prevent search engines from seeing duplicate content for domain.tld/ and domain.tld/index.[htm|php|shtml|etc.] Unfortunately, as long as there is an index.htm file, the server is going to serve that index.htm page first, unless, as I said above, I force it to serve the index.php using the htaccess file … but that leads back to my original problem again: visitors seeing a partially finished WordPress site.
So, I know my way around a .htaccess file, but I can’t get around WordPress’ desire to strip the /index.php off the URL without so much as a “by your leave”.
I’ve searched the various core files for this URL truncating behavior, but I can’t seem to find the line. I thought maybe it was the ABSPATH setting on line 20 of the wp-load.php file …
/** Define ABSPATH as this files directory */ define( 'ABSPATH', dirname(__FILE__) . '/' );
I changed it to …
/** Define ABSPATH as this files directory */ define( 'ABSPATH', dirname(__FILE__) . '/index.php' );
… but that made no difference.
So, now, for the time being, I’m stumped.
I do know this … I seem to be the only person having this problem … and that usually means I’m missing something very basic … so please, keep the suggestions coming.