0

Hi there I have been looking through some of the posted answers on how to do this and I am coming up a bit lost. Some of the posts I have read are as follows:

The URLs we have currently look something like this:

    example.com/search/?itemID=I-123456&itemName=FirstItemName+SecondItemName+MoreItemNames

I would like them to read something more towards this:

    example.com/search/FirstItemName/SecondItemName/MoreItemNames/

Any guidance would be greatly appreciated. Thanks!

  • Do you have access to the console? Do you know whether or not you are using apache? If so, can you make sure that ModRewrite is installed and loaded? (E.g.: `a2enmod rewrite`). After you can confirm that we can continue working on your .htaccess directives. – posixpascal Apr 24 '18 at 16:18
  • I don't have direct access to the console, but I know they are running apache and that ModRewrite is enabled. I am working on the site in a staging environment for now, and giving it back to them once it is done. – Grant Sharp Apr 25 '18 at 14:28
  • Can you confirm that rewrites themself work? If so we can continue building the rewrite together :). Can you test the most minimal rewrite? Something like: RewriteEngine on (newline) RewriteRule "^/test" "http://yourdomain.de/search/" (newline) – posixpascal Apr 25 '18 at 14:44
  • Hi Pascal, I can't seem to get your simple test working, but I am pretty confident that it is me that is the issue and not the rewrite engine. The site is a standard wordpress installation (albeit with some customizations) The exisitng htaccess file has the following lines in it. RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] When I remove this from the file, I get 404 errors all over the place so I am assuming the rewrite engine is on and working. – Grant Sharp Apr 25 '18 at 17:40
  • Can you remove the leading ‚/‚ from index.php? Since you are getting 404 and not 5XX it should work. It just cant find the index you sre lookinh for. On mobile right now. Lets continue tomorrow in chat (gmt+1). – posixpascal Apr 25 '18 at 21:25

0 Answers0