Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

have a wordpress website on my main domain

For the wordpress website i have this in my .htaccess file

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

# END WordPress

I just created an addon domain and wanted to use new rules for it

I created a .htaccess file and put it inside the addon folder eg /newaddon

In the .htaccess file i have:

Options -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^readjob/(.*)/(.*)/(.*)/$ readjob.php?id=$1&amp;cat=$2&amp;title=$3
</IfModule>

The url stucture i have is this:

http://www.website.com/readjob/3/jobs/web-designers-potech-integrated-services/

But it keeps telling me link is broken

I dont know what to do, pls i need assistance

(pls i just learnt mod rewriting today, so clarity will be highly appreciated)

Thanks

share|improve this question
    
This probably should be on stackoverflow –  John Conde Oct 3 '10 at 19:57
add comment

2 Answers

Replace &amp; with just & (it works here). If there are still troubles you may want to add [L] to the end (it means that if it matches processing of rules should stop) just in case there is a conflict. Finally check your set-up allows trailing slashes.

share|improve this answer
    
thank you so much, i have long replaced that, a friend on stackoverflow told me to add Options -Multiviews to it and it works now, bt it doesnt see the css and pics folder inside the addon domain, pls any idea? –  Ogugua Belonwu Oct 4 '10 at 16:54
    
Same scenario, if you can set up an isolated test of it, then turn on debugging and fire up gdb to see where it really looks for the files (personally I am forever hitting troubles when there is more than one RewriteRule). Alternatively you can just wrap up Apache in strace then look for the last few entries in the log. If you can post your server side folder layout and the relevant sections from your conf then it can be looked into, however that kind of question may be better on ServerFault/StackOverflow (as you've started you can post the link to it here though). –  Metalshark Oct 4 '10 at 18:19
add comment

Just merge your .htaccess files.

 <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^readjob/(.*)/(.*)/(.*)/$ newaddon/readjob.php?id=$1&cat=$2&title=$3
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
</IfModule>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.