Author Topic: .htaccess works, but isnt working completely.?  (Read 5469 times)

0 Members and 2 Guests are viewing this topic.

Offline
*
.htaccess works, but isnt working completely.?
« on: September 02, 2019, 02:34:32 PM »
I am trying to do a Rewright in my .htaccess file.. i have it placed in my sites document root (example.com/topics)
 
I have also (for testing) added it to the vhosts.conf of that domain. (which didnt do anything better)

here is the htaccess file paste:
Options +FollowSymlinks -MultiViews
Options +Indexes
RewriteEngine On
RewriteBase /
<IfModule mod_rewrite.c>

order allow,deny
allow from all

RewriteRule ^topics/(.+)\+(.+)$ topics/$1_$2 [R=301] [N]
RewriteRule ^/example.com/topics/ /example.com/topics/?

The first 'rule' should replace the "+" symbols into "_" (in the URI) after i do a search..
The second 'rule' should 'remove' the 'QUERY SYMBOLS' ("?q=")

when i do a "search" (using a standard form)
the URL changes to "example.com/topics/?q=word+searched+for"

i would like to make that rewright do this:
"example.com/topics/word_searched_for"

ive seen it done.. there are MANY examples online (stackexchange/google, etc)
NON have worked..

I can verify my mod_rewrite is working.

and

i know the proper .htaccess file IS being used,
as if i make a random change, it will through a "500 Error".
so, i know its working.

anyways, i have worked on this for several Days..
ANY help or suggestion would be grately appreciated.

Thanks in advance.
X


« Last Edit: September 02, 2019, 02:49:09 PM by x1705 »

Offline
**
Re: .htaccess works, but isnt working completely.?
« Reply #1 on: September 03, 2019, 10:35:05 AM »
comment the following from the .htaccess file

#Options +FollowSymlinks -MultiViews
#Options +Indexes

Offline
*
Re: .htaccess works, but isnt working completely.?
« Reply #2 on: September 04, 2019, 10:15:10 AM »
Thanks for the reply, i commented those out, and it still does not work.

this is really  bizarre, i have literally tried EVERY RewriteCond and Rule that i can find.

:/