Mobile app version of vmapp.org
Login or Join
Shakeerah822

: Routing URLs .htaccess file problem When I click any link on my website it will show only the home page. http://example.com/article-rewriter When I add ?route=, the URL is correct: http://example.com/?route=article-rewriter/

@Shakeerah822

Posted in: #Htaccess #ModRewrite

When I click any link on my website it will show only the home page.
example.com/article-rewriter

When I add ?route=, the URL is correct:
example.com/?route=article-rewriter/

How can I solve it for all URLs at the same time.

This is my .htaccess file content:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php?/[CO] [PT,L]

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Shakeerah822

1 Comments

Sorted by latest first Latest Oldest Best

 

@Jamie184

RewriteRule .* index.php?/[CO] [PT,L]



If the actual URL requires the route URL parameter then it would seem that you simply need to include this in the RewriteRule substitution? So, try the following instead:

RewriteRule .* index.php?route=[CO] [L]


Note also that the PT flag is not required in a per-directory context.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme