Jump to content

/username instead of ?p=username


ryanfilard

Recommended Posts

It did not this is my whole ht file:

 

 

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

 

# END WordPress

RewriteCond %{HTTP_HOST} ^ryanweekly.ryanweekly.com$ [OR]

RewriteCond %{HTTP_HOST} ^www.ryanweekly.ryanweekly.com$

 

RewriteEngine On

RewriteRule ^\/(.*)\/(.*)\/.*$ user/index.php?p=$1

 

Those earlier rules may be interfering with the later rule.

 

'-d' (is directory)

Treats the TestString as a pathname and tests if it exists and is a directory.

'-f' (is regular file)

Treats the TestString as a pathname and tests if it exists and is a regular file.

 

Anything which doesn't exist as a file or directory is getting rewritten to ./index.php by the WordPress rules.  You can try putting your rules first:

 

RewriteEngine On
RewriteRule ^\/(.*)\/(.*)\/.*$ user/index.php?p=$1

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
RewriteCond %{HTTP_HOST} ^ryanweekly.ryanweekly.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.ryanweekly.ryanweekly.com$

 

I have no idea if that will work as rewrite rules can be quite arcane, but it's worth a try.

I think you'll need to use the debugging features of rewrite rules, as mentioned here: http://blog.logeek.fr/2007/12/31/how-to-debug-rewrite-rules-with-apache

 

Basically it'll create a log telling you how it interpreted your rewrite rules.  By looking at that log you can get an idea of what needs changing.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.