change url on wordpress

New to mod_rewrite? This is a good place to start.

change url on wordpress

Postby The Drooler » Tue Sep 08, 2009 11:35 pm

Hi I am trying to rearrange the order of the url in wordpress from

example.com/state/county/city to
example.com /state/city/county

I used the following on my home server and it worked
but when I moved it to godaddy I get "No Input File Specified".
Can you tell if the error is in the rewrite rule.

RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ /index.php/$1/$3/$2 [NC,L]

</IfModule>



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

# END WordPress

thank you
The Drooler
 
Posts: 3
Joined: Tue Sep 08, 2009 5:44 pm

Postby richardk » Wed Sep 09, 2009 12:13 pm

Can't you change the URLs in the Wordpress control panel?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby The Drooler » Wed Sep 09, 2009 11:49 pm

Hi,
The short answer is no.
My wordpress control panel locks up do to a memory error so I can't get into the admin section. I can get to the files and database.
However, even if I was able to get in I wouldn't know what to change.
I am mainly wondering if the rewrite rule is correct since it seems to work on my local server. I'm just trying to eliminate possible errors. This website is leaking all over and I am bailing as fast as I can. Thanks
The Drooler
 
Posts: 3
Joined: Tue Sep 08, 2009 5:44 pm

Postby richardk » Thu Sep 10, 2009 7:24 am

My wordpress control panel locks up do to a memory error so I can't get into the admin section.

You should probably worry about that first.

I am mainly wondering if the rewrite rule is correct since it seems to work on my local server.

You have the rule working with Wordpress?

I don't think mod_rewrite can do this as Wordpress (i think) uses the REQUEST_URI variable and mod_rewrite can't change it. You could probably add something to the index.php file to change the REQUEST_URI variable.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby The Drooler » Fri Sep 11, 2009 12:37 am

Thanks
I'll try the index.php file.
The Drooler
 
Posts: 3
Joined: Tue Sep 08, 2009 5:44 pm


Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 31 guests

cron